For the optional tag, The JPA 1 Spec states:
"(Optional) Whether the value of the field or property may be null. This is a hint and is disregarded for primitive types; it may be used in schema generation."
It is optional (most hints are), but TopLink/EclipseLink will use the tag for schema generation - relying on the database to do validation if it is required. If you used schema generation for your tables, you'd see they were created with the not-null constraint.
Best Regards,
Chris
[Message sent by forum member 'chris_delahunt' (chris_delahunt)]
http://forums.java.net/jive/thread.jspa?messageID=318178