This content has been marked as final.
Show 3 replies
-
1. Re: Single Inheritance / ConstraintViolationException / Pos
waynebaylor Sep 13, 2007 10:50 AM (in response to toni)you could try @Column(nullable=false)
-
2. Re: Single Inheritance / ConstraintViolationException / Pos
toni Sep 13, 2007 12:17 PM (in response to toni)Thanks for the advice. However, the problem is that those columns are out of scope for any annotations I place on my columns.
That's because those columns are automatically generated by hibernate to keep track of the OneToMany relationships. In other words I have no column on which I could place this annotation - because I don't define them (Only indirectly versus the OneToMany annotation).
Hibernate should realize byitself that only ONE of those columns should be set per row and that the other columns should be set to NULL.
Any other ideas? -
3. Re: Single Inheritance / ConstraintViolationException / Pos
waynebaylor Sep 14, 2007 9:35 AM (in response to toni)you can use @Column like this:
@OneToMany(cascade = {CascadeType.ALL}) @Column(nullable=false) List<Juniors> juniors = new ArrayList<Juniors>();