Arul Pragasam (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=59fd553...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmY5M2MyZGNk...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16854?atlOrigin=eyJpIjoiYmY5M2...
) HHH-16854 (
https://hibernate.atlassian.net/browse/HHH-16854?atlOrigin=eyJpIjoiYmY5M2...
) With EmbeddedId having a generated value using GenerationType.IDENTITY does not have the
generated value after save (
https://hibernate.atlassian.net/browse/HHH-16854?atlOrigin=eyJpIjoiYmY5M2...
)
Issue Type: Bug Assignee: Unassigned Attachments: JPAUnitTestCase.java Created:
26/Jun/2023 20:04 PM Priority: Major Reporter: Arul Pragasam (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=59fd553...
)
I have a composite key which consists of two parts
* Account_id
* id
Id column is generated using strategy GenerationType.IDENTITY. When we create a new object
and save using entitymanager, after save the object does not have the generated id back.
CompositeKey key = new CompositeKey();
key.setAccountId(1L);
SalesContact contact = new SalesContact();
contact.setFirstName( "John" );
contact.setKey(key);
entityManager.persist( contact );
Assertions.assertNotNull(key.getId());
JPAUnitTestCase.java (
https://hibernate.atlassian.net/rest/api/3/attachment/content/50473
)
(
https://hibernate.atlassian.net/browse/HHH-16854#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16854#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:3bc807d )