[jboss-user] [EJB 3.0] - Re: @Basic(optional=true) vs @Column(nullable=true)

martin ganserer do-not-reply at jboss.com
Thu Sep 14 09:41:41 EDT 2006


Hi,

yes and no!

With @Basic(optional=true) the persistence provider checks if a field is nullable or not. For example if false is selected you will get an error by the persitence provider if you forget to set a field. The @Column(nullable=true) is an information that the persistence provider uses when he creates physical database objects. It's up to you to select if the persistence provider and/or the database should check this.

Hope that helps you!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971552#3971552

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971552



More information about the jboss-user mailing list