Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to unmarshal selective data per subclass

Mark the attribute in Product as transient. In xml simply add the mapping definition to the Lamp entity definition. lf you are only using annotations you should be able to override the getter and setter in Lamp and set the mapping annotation there. If you use using field level access you may want to wait for the new access type feature which will allow you to switch access types on only this mapping so you will not need to switch the entire class. That feature is in progress.

Leon Derks wrote:

I have an abstract class Product that contains a List<Characteristic> characteristics;

I also have two subclasses Lamp and Gear that extend this Product Class.

I was wondering if it is possible to unmarshall the characteristics only for Lamp Classes.
When it is a Gear I don't want the characteristics to be unmarshalled.

Is this possible? And how can I do this?
Do I need some kind of afterLoader descriptor?

eclipselink-users mailing list

Back to the top