Ognjen Blagojevic wrote: > > It must be a way to INSERT objects in the database without looking up > for all the references, but I am not able to find it. >
My problem is similar as yours, with a single difference. I don't mind loading all the references because I need them in the program. But I don't know how to insert object and disable an attempt of inserting in related tables. If I put cascade = cascadeType.PERSIST, I get an exception (as you do). If I don't put cascade = cascadeType.PERSIST (which is logical), I get an exception. Since I'm new in JPA, I'm quite lost now. -- View this message in context: http://www.nabble.com/How-to-PERSIST-object-without-loading-references--tp16472647p17778155.html Sent from the OpenJPA Users mailing list archive at Nabble.com.