Both. I modified the example to persist more than one Person object in a single invocation. That works and each Person gets a unique database Id. But the database Id is not populated back into the newly persisted object which still has a null Id in memory.
So if I add @GeneratedValue(strategy=GenerationType.IDENTITY) as you correctly suggested the newly persisted Person has the new database Id when the entity is flushed.
The example Person primary key should have @GeneratedValue(strategy=GenerationType.IDENTITY)
[Message sent by forum member 'jotobjects' (jotobjects)]
http://forums.java.net/jive/thread.jspa?messageID=205086