Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Override an attribute so that it is now non-optional?

I have a mapped superclass with a @Basic mapping in it.  The mapping is defined as @Basic(optional = true), @Column(name = "x", nullable = true).

I'd like to override this so that it behaves in the subclass entity as though it were annotated like this: @Basic(optional = false), @Column(name = "x", nullable = false).

I understand I can override the @Column annotation using @AttributeOverride.  But how can I override the @Basic annotation?  Seems like changing the field's optional-ness is not possible?

Best,
Laird

--
http://about.me/lairdnelson

Back to the top