@Column annotation is disregarded for entities in an @ElementCollection if owning entity uses AccessType.PROPERTY for @Id field
Description
duplicates
Activity
Show:

Former user March 28, 2016 at 7:06 PM
Duplicates HHH-9089.

Benedikt Waldvogel March 4, 2016 at 10:37 PM
It rather wasn’t added explicitly to express something but I stumbled upon this issue and it took me quite some time to reduce it to the AccessType annotation. At least it shouldn’t hurt, right?
Steve Ebersole February 28, 2016 at 5:47 PM
What exactly is it you are trying to express with the @Access(AccessType.PROPERTY)
on the id attribute? I am confused by this.
Given are the following two JPA entities:
Event.java
Tag.java
It seems that Hibernate disregards the
@Column(nullable = false)
annotation onTag.value
if and only ifEvent.id
is annotated with@Access(AccessType.PROPERTY)
.I published a minimal test case on https://github.com/bwaldvogel/hibernate-element-collection-access-type-issue.
EventTest.testPersistInvalidTag()
unexpectedly fails on the assertion.