Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
回复: [eclipselink-users] How to save a specific instance of an Entity

may be you just need another entity, say ServiceInstance.

在 2010-5-31 下午4:03,"RogerV" <roger.varley@xxxxxxxxxxxxxx>编写:


I've got two entities. @Entity ServiceDefinition which comprises parameters
that control the flow of a program to perform a service. Because the
execution of the service can fail, I have my second entity

public class ServiceTransaction {

private ServiceDefinition serviceDefinition;

.. getters/setters

What I want to store in ServiceTransaction is not a pointer to the
definition held in @Entity ServiceDefinition but the specific instance of
ServiceDefinition that I'm using (because ServiceDefinition could change).
In addition I would like to store the instance as an object rather than as a
collection of data elements so that I can restore its state. At runtime
Eclipselink is complaining that I don't have join details defined between
ServiceTransaction and ServiceDefinition.

Is it possible to do what I want, and if so, how?

View this message in context:
Sent from the EclipseLink - Users mailing list archive at

eclipselink-users mailing list

Back to the top