You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-dev@incubator.apache.org by "Christophe Lombart (JIRA)" <ji...@apache.org> on 2007/03/07 21:37:24 UTC
[jira] Commented: (GRFT-126) Add support for the "Reference" jcr
type
[ https://issues.apache.org/jira/browse/GRFT-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478912 ]
Christophe Lombart commented on GRFT-126:
-----------------------------------------
I just commited the following point :
* There is a new atomic converter (ReferenceTypeConverterImpl) which can be used to map a String attribute into a jcr property (based on the reference type).
ex. :
<field-descriptor fieldName="reference2A" jcrName="reference2A" converter="org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.ReferenceTypeConverterImpl" />
in this example, the jcr prop "reference2A" will contains a valid uuid.
* There is a new bean converter (ReferenceBeanConverterImpl) which can be used to map a bean attribute into a jcr reference property.
ex.:
<bean-descriptor fieldName="a" jcrName="a" converter="org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ReferenceBeanConverterImpl" />
In this example, the jcr prop "a'" will contain a valid uuid but in the java object graph, the object matching to this uuid will be loaded.
* See the unit test : PersistenceManagerUuidTest to get more details.
I'm going to work on uuid/reference support in collections.
> Add support for the "Reference" jcr type
> ----------------------------------------
>
> Key: GRFT-126
> URL: https://issues.apache.org/jira/browse/GRFT-126
> Project: Graffito
> Issue Type: Sub-task
> Reporter: Christophe Lombart
> Assigned To: Christophe Lombart
>
> Supporting reference could be done in different ways.
> Just a couple of ideas (which required more investigation ) :
> * Define a field-descriptor which will contain an uuid to point to another object.
> * Define a bean descriptor which is mapped to a jcr prop of type reference.
> * Define a collection of properties based on the type "Reference".
> * Define a collection containing some referenced beans.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.