Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-4233 (
https://hibernate.atlassian.net/browse/HHH-4233?atlOrigin=eyJpIjoiODI3MjB...
)
Re: cant bind a child using mappedby relating to a parent attribute(polymorphism) (
https://hibernate.atlassian.net/browse/HHH-4233?atlOrigin=eyJpIjoiODI3MjB...
)
Can we stop with these inane “well JPA provider X” does it? I can’t think of any other
argument that makes me want to do something less. Either you are claiming Hibernate
violates the spec or simply trying some kowtow technique to force to do something I guess?
Considering Hibernate passes all JPA TCK tests, hard to be #1.
That said…
I am not able to reproduce this. I took this psuedo-model and was able to use it just
fine:
@Entity( name = "Person" )
@Table( name = "persons" )
public static class Person {
@Id
private Integer id;
private String name;
@OneToMany( cascade = CascadeType.ALL, mappedBy = "owner" )
private List<Cat> cats = new ArrayList<>();
}
@Entity( name = "Mammal" )
@Table( name = "mammals" )
@Inheritance( strategy = InheritanceType.JOINED )
public static class Mammal {
@Id
private Integer id;
private String name;
@ManyToOne
@JoinColumn( unique = true )
private Person owner;
}
@Entity( name = "Cat" )
@Table( name = "cats" )
public static class Cat extends Mammal {
private boolean polydactyl;
}
@Entity( name = "Dog" )
@Table( name = "dogs" )
public static class Dog extends Mammal {
private boolean akcRecognized;
}
So going to need a reproducer.
I looked at this because Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) asked me to. Please open a new issue with a test that actually reproduces this and link
it here
(
https://hibernate.atlassian.net/browse/HHH-4233#add-comment?atlOrigin=eyJ...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-4233#add-comment?atlOrigin=eyJ...
)
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#100126- sha1:454696e )