You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a @onetomany relationship between two entity types, if the entity on the One side has a composite key, objects on the Many side fail on insert when persisting the entity on the One side. Seems like it can't resolve the embedded ID when when creating the insert statement. The error is something like:
ERROR insert into vehicle(make, model, "id") values ("Toyota", "Corolla", "com.site.entity.OwnerKey")
Here id is not a column name, but the Java field variable in the Owner entity:
@EmbeddedId
private OwnerKey id;
The "id" is not resolving to the column names specified in @JoinColumns, and the OwnerKey object is not resolving to its values.
The text was updated successfully, but these errors were encountered:
In a @onetomany relationship between two entity types, if the entity on the One side has a composite key, objects on the Many side fail on insert when persisting the entity on the One side. Seems like it can't resolve the embedded ID when when creating the insert statement. The error is something like:
ERROR insert into vehicle(make, model, "id") values ("Toyota", "Corolla", "com.site.entity.OwnerKey")
Here id is not a column name, but the Java field variable in the Owner entity:
@EmbeddedId
private OwnerKey id;
The "id" is not resolving to the column names specified in @JoinColumns, and the OwnerKey object is not resolving to its values.
The text was updated successfully, but these errors were encountered: