Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] @ManyToOne(optional=false) versus @Column(nullable=false)

Our interpretation of the optional "optional" (that's not a typo) attribute is that it is intended to be in-memory validation and not impact on DDL generation as there is a specific DDL attribute "nullable=false"
--Gordon

cowwoc wrote:
Oops, I hit send too soon. The question should read:

I was under the impression that @ManyToOne(optional=false) will create
non-null columns, but it seems that it doesn't. Adding a
@JoinColumn(nullable=false) fixes the problem but then I'm left wondering
what optional=false is supposed to be doing...?

Is this a bug or a misunderstanding?

Thank you,
Gili


cowwoc wrote:
  
Hi,

I was under the impression that @ManyToOne(optional=false) versus
@Column(nullable=false) will yield non-null columns, but it seems that
@ManyToOne(optional=false) creates a nullable column.

Is this a bug or a misunderstanding?

Thank you,
Gili

    
  

Back to the top