openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From idan <ida...@gmail.com>
Subject FieldMetaData.getAssociationType() resets its value in embedded object
Date Wed, 09 Feb 2011 13:47:48 GMT

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.

Mime
View raw message