users@glassfish.java.net

Re: EJBQL Exception

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 30 Apr 2007 21:56:36 -0700

Shevland, Joe wrote:
>>While @ManyToOne (or any other relationship annotation) is
>>required, the @Column or @JoinColumn are optional - if your
>>mapping is the same as the defaults defined in the spec, you
>>don't need them.
>
>
> Makes sense; I'd say though the cases where you don't need to define a
> property->column mapping are pretty rare (almost restricted to tutorials
> and shallow examples I'd say) - all projects I've worked on to date have
> either had a legacy database, or a schema that's being dictated by
> DBA's/database standards for column names etc. A JPA-generated database
> schema is probably not going to be very good if you don't use the Column
> mapping for things like length, nullability etc. Or on the other hand,
> you'd have getters/setters like getPrs_Fst_Nm() which I personally
> wouldn't allow in a codebase.

Agree ;)

-marina

>
> Cheers
> Joe
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>