vladmihalcea / high-performance-java-persistence

The High-Performance Java Persistence book and video course code examples
Apache License 2.0
1.31k stars 489 forks source link

Fail merge #51

Closed lisandrofernandez closed 4 years ago

lisandrofernandez commented 4 years ago

This test fails because an org.hibernate.TransientObjectException is thrown when calling post.getComments().isEmpty() with a merge operation.

A couple of things to mention:

vladmihalcea commented 4 years ago

@lisandrofernandez I checked it out, and it's a Hibernate bug. You need to open a Jira issue and attache a replicating test case.

It looks like the merge generates an extra copy of the transient entity which has an id of null as if it was loaded from the DB.

I think @gbadner is the best person to tackle this issue.

lisandrofernandez commented 4 years ago

@vladmihalcea I opened HHH-13815 to track the issue. I also opened a pull request with a replicated test case.

vladmihalcea commented 4 years ago

Great.