Prashant,
Does the getter have an equivalent setter? If so, this is not a bug. This is
the defaulting behavior I outlined earlier.
If there is no setter than, this is a bug.
Cheers,
Guy
----- Original Message -----
From: "Marina Vatkina" <Marina.Vatkina_at_Sun.COM>
To: <persistence_at_glassfish.dev.java.net>
Sent: Friday, May 29, 2009 2:57 PM
Subject: Re: transient properties
> Prashant,
>
> Do you explicitly list all defined properties in the orm.xml or just
> specify the access type? If it's the former, and an extra getter is
> treated as a property, it looks like a bug. Otherwise listing all the
> persistent properties can be a solution for you.
>
> Regards,
> -marina
>
> Prashant Dighe wrote:
>> Hello,
>>
>> There is an orm.xml mapping with xml-mapping-metadata-complete and access
>> specified as "PROPERTY".
>> The persistence class mapping is defined and working.
>>
>> Now when some getter is added to the persistent entity class, it gets
>> picked up and mapped by default to a column which does not exist. This
>> can be fixed using transient element in the entity definition or by
>> adding @Transient annotation to the getter.
>>
>> The question is, is there a way to prevent this w/o using transient?
>>
>> Since the meta data is complete, and is really completely defined in the
>> entity element, why is anything not defined in the attributes element of
>> the mapping being picked up?
>>
>> In other words, when the mapping is explicitly and completely defined in
>> the orm.xml, why is it trying to map other unmapped properties over
>> zealously and can this be avoided such that anything not defined in the
>> mapping should be treated as transient automatically.
>>
>> Thanks,
>> Prashant
>
>