• Post Reply Bookmark Topic Watch Topic
  • New Topic

jpa how to fetch namedEntityGraph on detached entity?

 
Rj Ewing
Ranch Hand
Posts: 118
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the best way to do additional work on detached entities?

Some context...

I am currently fetching the user in a Filter for my REST services. In some cases, I need work with some lazy collections on the User entity. What is the best way to do this?

I am currently calling entityManager.merge, and then calling the getCollection method.

UserService:
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!