Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Column definitions and DDL

On 08/29/2012 10:59 PM, Laird Nelson wrote:
Just another user here.  Usually you want to line up your optional and nullable attributes—normally if the @JoinColumn's nullable attribute is true, then the @ManyToOne's optional attribute should be true as well.

Yes, the optional should be false as well, it's a typo, which does not affect the resulting DDL for me, though. The spec says that the optional attribute may be used during DDL generation, while nullable is used during DDL generation. Moreover, I have seen some experts saying that optional is only affecting the in memory check performed by JPA provider, while nullable is supposed to affect the underlying column definition.

Thanks for replying!

Back to the top