Duplicate column on repeated schema generation

2011-04-14 Thread realdepp
Hi, I got an @Embedded object with an @ElementCollection (Map) inside. And in persistence.xml, the following property is set: When I start my application for the second time (without clearing the database) I get the following exception: org.apache.openjpa.persistence.PersistenceException: Dopp

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-12 Thread realdepp
I forgot to add it here - I opened a bug report: https://issues.apache.org/jira/browse/OPENJPA-1977 -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6265927.html Sent from the OpenJPA Users mailing list archive at Nab

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-11 Thread realdepp
I'm not sure about that - the final modifier seems to be the cause for the problem. The JPA spec sais: "Entity classes may not be final. No method of an entity class can be final." BUT the OpenJPA docs say: "OpenJPA supports final classes and final methods." http://openjpa.apache.org/builds/2.1.0

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-07 Thread realdepp
I think I got it: When I mark the getter and the setter for the id as "final", the error occurs. Without final it works fine. -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6249036.html Sent from the OpenJPA Users m

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-06 Thread realdepp
Yes, MyBase is in persistence.xml. -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6247366.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-06 Thread realdepp
I don't know whats happening here - I tested with MySQL 5.1.31 and it worked. Then I switched back to MySQL 4.1.22 and it worked, too. So I'm not able to reproduce the error for now - but I have no idea why. -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-Generat

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-06 Thread realdepp
MySQL version is 4.1.22 Connector version is 5.1.8, JDBC version is documented as 4.0 -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6247210.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-06 Thread realdepp
Thanks, but that didn't solve the problem. EntityManager.refresh() has no effect, like expected. I'm not enhancing with an eclipse tool, I'm calling the java program via ant:

Issues with GeneratedValue and SequenceGenerator

2011-04-05 Thread realdepp
Hi! I'm working with OpenJPA 2.1.0 and have (simplified) the following superclass. All "real" entities derive from that class: @MappedSuperclass public abstract class MyBase { private long id; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public final long getId() {