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>编写:


Hi

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

@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?

Regards
--
View this message in context: http://old.nabble.com/How-to-save-a-specific-instance-of-an-Entity-tp28727685p28727685.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top