-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: detached entity passed to persist error
PostPosted: Thu Apr 07, 2011 6:46 am 
Newbie

Joined: Thu Apr 07, 2011 6:38 am
Posts: 8
Hi
I am using persist method to save and merge method to update in my
DAO layer and I am using
@Transactional(readOnly=true) annotation in my every save method
but still i am getting the detached entity passed to persist error

please help
thank you


Last edited by manojpal17 on Fri Aug 19, 2011 6:38 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: detached entity passed to persist error
PostPosted: Thu Apr 07, 2011 8:25 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
Quote:
@Transactional(readOnly=true) annotation in my every save method


if the transaction is read-only, you can only read not save objects.

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
 Post subject: Re: detached entity passed to persist error
PostPosted: Fri Apr 08, 2011 1:18 am 
Newbie

Joined: Thu Apr 07, 2011 6:38 am
Posts: 8
Hi mmerder
Thank you for your suggestion as you told i do the following changes in my DAO layer
but the same errors are coming.


please help
thank you


Last edited by manojpal17 on Fri Aug 19, 2011 6:42 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: detached entity passed to persist error
PostPosted: Tue Apr 19, 2011 12:22 am 
Newbie

Joined: Thu Apr 07, 2011 6:38 am
Posts: 8
Hi
What exactly the difference between merge() and persists(). As my "detached entity persist error" is solved by using merge in steaded
of persists()


Top
 Profile  
 
 Post subject: Re: detached entity passed to persist error
PostPosted: Wed Jun 08, 2011 12:51 am 
Newbie

Joined: Thu Apr 07, 2011 6:38 am
Posts: 8
i got the solution ...
my problem is that i am using same object to insert always...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.