-to-PERSIST-object-without-loading-references--tp210631p735154.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
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.
= 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
PROTECTED] wrote:
From: Enrico Goosen [EMAIL PROTECTED]
Subject: Re: How to PERSIST object without loading references?
To: users@openjpa.apache.org
Date: Wednesday, June 11, 2008, 11:44 AM
I'm getting so frustrated with OpenJPA!
I'm also experiencing the problem listed in previous
reply
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
It is, indeed. Thanks.
Now I really understand why did the specification declared both find
and getReference. O:)
Regards,
Ognjen
Patrick Linskey wrote:
Hi,
EntityManager.getReference() is your friend here.
-Patrick
On Thu, Apr 3, 2008 at 4:19 AM, Ognjen Blagojevic [EMAIL PROTECTED]
Hi all,
Is there a way to persist an Entity without loading all the referenced
objects?
I know that this is possible:
Employee e = new Employe();
e.setName(John Doe);
e.setIdDepartment(findDepartmentByPrimaryKey(idDept));
e.setIdRank(findRankByPrimaryKey(idRank));
// and so on
em.persist(e);
Hi,
EntityManager.getReference() is your friend here.
-Patrick
On Thu, Apr 3, 2008 at 4:19 AM, Ognjen Blagojevic [EMAIL PROTECTED] wrote:
Hi all,
Is there a way to persist an Entity without loading all the referenced
objects?
I know that this is possible:
Employee e = new Employe();