Re: InvalidStateException deleting an instance with a timestamp in its primary key

2011-11-09 Thread Ernesto Ricci
Thank you Rick, I've just created the issue OPENJPA-2072 as you've suggested. -- View this message in context: http://openjpa.208410.n2.nabble.com/InvalidStateException-deleting-an-instance-with-a-timestamp-in-its-primary-key-tp6968640p6977212.html Sent from the OpenJPA Users mailing list

Constraint violation using OneToOne relationship

2011-11-09 Thread M. Walter
We have an entity A having a OneToOne unidirectional relationship to entity B configured like this: In entity A: @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = B_ID) private B b; Now we create new entities A and B and would like to persist them: final A a = new A(); final B b = new

Re: Constraint violation using OneToOne relationship

2011-11-09 Thread Rick Curtis
What do you have set for properties in your persistence.xml ? Thanks, Rick On Wed, Nov 9, 2011 at 8:57 AM, M. Walter marc.wal...@sbb.ch wrote: We have an entity A having a OneToOne unidirectional relationship to entity B configured like this: In entity A: @OneToOne(cascade =

Re: Constraint violation using OneToOne relationship

2011-11-09 Thread M. Walter
Hi Rick, these are the properties for the unit test PU: properties property name=openjpa.Log value=DefaultLevel=INFO, SQL=WARN, JDBC=WARN, Query=TRACE, Schema=ERROR, Runtime=WARN / property name=openjpa.ConnectionFactoryProperties value=PrintParameters=true,

Re: Constraint violation using OneToOne relationship

2011-11-09 Thread Rick Curtis
Have you tried setting the following property ? It seemed to fix my recreate of your scenario (on trunk anyway). property name=openjpa.jdbcSchemaFactory value=native(ForeignKeys=true)/ Thanks, Rick On Wed, Nov 9, 2011 at 9:23 AM, M. Walter marc.wal...@sbb.ch wrote: Hi Rick, these are the

Re: Constraint violation using OneToOne relationship

2011-11-09 Thread M. Walter
Hi Rick, thank you for the fast responses! Yes I successfully tried the solution IBM proposed. But why do I have to add this property just for OneToOne relationships in order to make them work properly? For all other relationships this is not necessary. I really would like to understand this