|
Re: Object identity - Hibernate Entity Manager - Teneo [message #420688 is a reply to message #420679] |
Mon, 07 July 2008 20:37 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Balázs,
I think that your views should share the same resource. You can load additional data in a resource
by calling the method: listByQuery(query, cache), cache is the query cache boolean. So then you
don't need to open a new resource for new queries. The listbyQuery returns the found objects as an
array so you can use the result directly in your search results while the resource serves as a kind
of first-level cache.
gr. Martin
Balázs Molnár wrote:
> Hello,
>
> If I have multiple (search) views which search into the database (with
> createQuery()), the result objects from the queries are different EMF
> objects even when the returned database entity/record is the same.
> Therefore if an editor that is opened on any of the views, changes the
> EMF object, the result will not be reflected in the other views even
> though the objects (from a user perspective) are the same.
>
> How can I achieve to have any given database record be represented on
> the EMF entity layer as the same object ?
>
> Would the use of Hibernate Entity manager solve this ? "It says the
> following: A persistence context is a set of entity instances in which
> for any persistent entity identity there is a unique entity instance".
>
> Thanks,
> Balázs
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03692 seconds