Hi,
Is it possible to use more than one component as a composite Id. Composite id accepts an attribute that allows one component to be set as a composite id, but is it possible to set multiple components as one composite id?
problem definition :
my POJO consists of fields that are complex objects and each of these objects persists themselves into more than one column of the parent table. So a component is a nifty feature. However, a developer may choose to define 2 such field objects as entity keys, which requires me to have a composite id that can have multiple components. I cannot change the use of these field objects, so I have to find a way to persist them. I also cannot restrict the developers to setting just one entity key as these field objects may not be capable of defining a complete key all by themselves.
What would be a recommended way to do this ??
hope to hear from you guys soon...
|