This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes EntityManager question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "EntityManager question" Watch "EntityManager question" New topic
Author

EntityManager question

Alex Bokov
Greenhorn

Joined: Jun 01, 2009
Posts: 16
Hi,
just started using hibernate entity manager with spring injection on tomcat and I have some questions.
My application does some classic steps: spring creates entity manager and injects it in some another object where it can be used.
The next step is getting list of some objects representing some info in data base like this:


And after some modifications on myRecords I need to save them again.
Now it looks like myRecords list is detached. My question is: can I merge/update entire list at once or I have to iterate it and merge each list element individually.
All transactions managed by spring.
Alex Bokov
Greenhorn

Joined: Jun 01, 2009
Posts: 16

hire is my applicationContext.xml

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

"alex pp", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EntityManager question
 
Similar Threads
hashCode for EntityManager
How to inject EntityManager via setter in spring
NullPointer exception thrown
Casting generics
Override AbstractFacade ?!