persistence@glassfish.java.net

Re: IdentityHashmaps

From: Markus Fuchs <Markus.Fuchs_at_Sun.COM>
Date: Fri, 29 Sep 2006 16:54:47 -0700

Hi,

Markus Fuchs wrote:

> Hi Tom, Gordon,
>
> During a transaction, will there be an IdentityHashmap for every
> subclass of an inheritance hierarchy, or is there only one for the
> base, which also contains all subclass instances?
>
My assumption: There's only one IdentityHashmap per hierarchy.

> When and where are new instances registered for a relationship
> annotated with cascade=PERSIST?

One place is UnitOfWorkImpl.registerNewObjectForPersist(), which is
called from em.persist, if the relationship is set at that time.

Please confirm! Thanks,

-- markus.

>
>
> Thanks!
>
> -- markus.