Eclipselink version: 2.0.0
Is it possible to use a _secondary table_
<http://www.eclipse.org/eclipselink/api/2.0/javax/persistence/SecondaryTable.html>
in such a way that inserts/updates happen only to the /primary /table?
You are probably wondering “Why on earth would you want that behavior”.
Here’s why. We are using the @SecondaryTable annotation to point to a
view which contains read-only data.
/@Table(//name=”REGISTRATIONS”)/
/@SecondaryTable(name=”REGISTRATION_STATUS_FLAGS_V)/
*p**ublic* *class* Registration {
...
/@Column(name=”EXPIRATION_STATUS” /
/ table=”REGISTRATION_STATUS_FLAGS_V”/
/ insertable=”false”/
/ updatable=”false”)/
private String expirationStatus;
}
The current setup is resulting in database errors because an insert to
the primary table results in an attempted insert to the secondary table
as well.
Sri
------------------------------------------------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users