You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by idan <id...@gmail.com> on 2011/02/09 14:47:48 UTC
FieldMetaData.getAssociationType() resets its value in embedded
object
Heya,
I have written my own StoreManager.
It seems that FieldMetaData.getAssociationType() resets its value in the
following scenario:
I persisted an Entity with an Embedded property which has a One-To-One
relation with another Entity.
When loading (for example em.find()) the entity, i'm initializing an
embedded state manager using the StoreContext.embed method.
Then for getting the type's fields i'm using:
fieldMetaData.getDeclaredTypeMetaData().getFields()
I think its obvious to think that the One-to-one relation field will have an
appropriate associationCode which isn't = 0.
But in my case the associationCode is 0.
When i'm looking at the exact class meta data through:
StoreManager.getConfiguration().getMetaDataRepositoryInstance().getMetaDatas();
The associationCode for the same field is as it should be (One-to-one
code...)
Is this a bug or am I doing something wrong?
(BTW - i'm using OpenJPA 2.0.0)
Thanks,
Idan
--
View this message in context: http://openjpa.208410.n2.nabble.com/FieldMetaData-getAssociationType-resets-its-value-in-embedded-object-tp6007705p6007705.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.