Hi,

There are some cases where we know an obj is detached, and optimize
away the SELECT. I don't remember the exact cases right now, and don't
have access to the docs, so this is probably only of limited
assistance.

It'd be good to know more about your domain model, though.

-Patrick

On 9/18/07, Evgeny Shepelyuk <[EMAIL PROTECTED]> wrote:
>       Hello !
> Is there any way to disable SELECT query to database when merging detached
> entity into EntityManager ?
> Im doing smth like
>
> ... getting user entity and closing EntityManager
>
> user.setFirstName("2222222");
>
> em = emf.createEntityManager();
> em.getTransaction().begin();
> user = em.merge(user);
> em.persist(user);
> em.getTransaction().commit();
> em.close();
>
> ....
>
> And when утешне is merged the additonal query is made to DB.
>
> --
> Best Regards
> Evgeny K. Shepelyuk
>


-- 
Patrick Linskey
202 669 5907

Reply via email to