This content has been marked as final.
Show 4 replies
-
1. Re: Getting a session from entityManager
mladen.babic Aug 6, 2007 5:55 AM (in response to mladen.babic)Any idea?
-
2. Re: Getting a session from entityManager
andydale Aug 6, 2007 9:08 AM (in response to mladen.babic)Hi,
Does the EntityManager work normally, for example does em.persist() work ?
I have had a problem berfore with em.getDelegate() returning an EntityManagerImpl which could not be cast to a session.
In the end i had to callSession sess = (Session)((EntityManagerImpl)em.getDelegate()).getDelegate()
orSession sess = (Session)((EntityManagerImpl)em.getDelegate()).getSession()
Cheers,
Andy -
3. Re: Getting a session from entityManager
mladen.babic Aug 6, 2007 10:21 AM (in response to mladen.babic)Yes, entityManager works fine with method persist.Only I can't get
Session from entityM.
I'm going to try.
tnx,
mb -
4. Re: Getting a session from entityManager
mladen.babic Aug 6, 2007 2:32 PM (in response to mladen.babic)Ok, I solved a problem.Now I have another:(.Problem is :It doesn't retrieves expected result(it 's retrieve nothing). Is there any mistake in my code above?
tnx,
mb