RE: can JPA Entity extend non JPA Entity?

2010-04-02 Thread sapatel
Thanks. It worked. From: No1UNo [via OpenJPA] [mailto:ml-node+4837713-719053112-48...@n2.nabble.com] Sent: Thursday, April 01, 2010 11:20 AM To: Patel, Sanjay Subject: Re: can JPA Entity extend non JPA Entity? You may be looking for '@Transient' [1] which indicates that a field should no

RE: can JPA Entity extend non JPA Entity?

2010-04-02 Thread sapatel
Thanks. From: ljnelson [via OpenJPA] [mailto:ml-node+4837820-1225260212-48...@n2.nabble.com] Sent: Thursday, April 01, 2010 11:36 AM To: Patel, Sanjay Subject: Re: can JPA Entity extend non JPA Entity? On Thu, Apr 1, 2010 at 10:56 AM, sapatel [via OpenJPA] <[hidden email]

Re: openjpa 1.2.2 - Optimistic Lock Exception

2010-04-02 Thread seth.jackson
Apparently the @JoinTable is creating SQL similar to the following: SELECT t0.* FROM PROOF.ACCOUNTS t0, PROOF.ACTIVITY t1, PROOF.ACTIVITY t2 WHERE t0.ACCOUNT_ID = t1.ACCOUNT_ID (+) AND t1.ACCOUNT_ID = t2.ACCOUNT_ID Why openJPA is creating a join to the same table twice is beyond me. I believe th

openjpa 1.2.2 - Optimistic Lock Exception

2010-04-02 Thread seth.jackson
I've receiving an Optimistic Lock Exception when performing the following operations and I'm not quite sure I understand why. Consider the following (this is just a proof): public interface Entity implements Serializable{} @Entity(name="Account") @Table(name="ACCOUNT", schema="PROOF") public c

Re: Lack of foreign key constraint

2010-04-02 Thread Michael Dick
Hi Jean-Baptiste, Historically OpenJPA does not create a FK constraint by default. You can indicate that one should be created by adding the @ForeignKey annotation (OpenJPA specific) to your entity classes. The schema tool and related tools will 'manipulate' foreign keys, but I don't remember seei

Lack of foreign key constraint

2010-04-02 Thread Jean-Baptiste BRIAUD -- Novlog
Hi, I just noticed that on the SQL file produced by OpenJPA to install DB schema, there are no integrity referential constraints. In other words, on relationship, there is no indication that one column is a foreign key. primary key are there but not foreign keys. Is it a problem (I didn't found