Christian Thiel (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *commented* on HHH-16682 (
https://hibernate.atlassian.net/browse/HHH-16682?atlOrigin=eyJpIjoiMDU0Mj...
)
Re: Changes in @JdbcTypeCode(SqlTypes.JSON) are not written to DB (
https://hibernate.atlassian.net/browse/HHH-16682?atlOrigin=eyJpIjoiMDU0Mj...
)
Hello Cedomir,
the assertion
assertEquals(CHANGED, result.get(0).getInfo(), "plain property not changed");
was only part of the code by accident. I tried to ‘force’ the entity to be dirty by
changing the info-value (see commented line) and that was the assertion for this.
Ignore/remove this…
What did you change exactly? As far as i can see just adding the name-property to the
@Entity-annotation? But that can solve be the problem 🤔
I have the impression that the transaction-handling in your test-code is slightly
different compared with my test.
In my test adding @Transactional(Transactional.TxType.REQUIRES_NEW) means, every method of
the test-class will have it’s own new transaction. So insert, update and select run in
different transactions.
If i change my test-case and let all methods use the same transaction (by using
@Transactional without any value, what defaults to REQUIRED), the assertion is green. So
within the transaction, the persistence-context holds&returns the correct value.
(
https://hibernate.atlassian.net/browse/HHH-16682#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16682#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#100225- sha1:d82e018 )