Hi Will,

thanks, that sounds like a good workaround! OCM is not a full blown 
standardized Object-mapper like JDO/JPA, so one has to live with it I 
guess...

Regards
Jörg

On 25.09.2013 15:05, Will Scheidegger (via Magnolia Forums) wrote:
> Well, with the ocm module, you can configure what fields you want to save. So 
> if your object has a getter and setter method for the uuid of the related 
> object, you can get ocm to simply persist this attribute instead of the 
> related object itself. For instance, let's say you have a PressRelease and an 
> Author object. The PressRelease object has a field (and accessor methods) for 
> the Author object (called "author"). But you don't want to store the author 
> underneath the press release because one author usually writes more than one 
> press release. So add accessor methods "getAuthorUUID()" and 
> "setAuthorUUID()" to your PressRelease class and configure OCM to persist the 
> "authorUUID" attribute, but not the "author" attribute. The "getAuthorUUID()" 
> method would of course simply return the uuid of the author (if there is 
> one). The corresponding setter method would get the Author object for the 
> UUID and set it in the PressRelease object.
>
> -will
>


-- 
*Dipl.-Inf. Jörg von Frantzius, Systems Architect*

Email mailto:[email protected]
Phone +49 30 283921-318
Fax +49 30 283921-29

Aperto AG - In der Pianofabrik
Chausseestraße 5, D-10115 Berlin-Mitte
http://www.aperto.de
http://www.facebook.com/aperto
https://www.xing.com/companies/apertoag

HRB 77049, AG Berlin Charlottenburg
Vorstand: Dirk Buddensiek (Vorsitzender), Kai Großmann, Stephan Haagen
Aufsichtsrat: Bernd Hardes (Vorsitzender)


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to