Hi All,
Let's say I have two tables, employee and department where emp has a @ManyToOne key to dept. Now I want to be able to delete rows from the dept table but keep the emp records pointing to it; basically saving the relationship so that when the dept table is recreated the relationship is restored. (This actually happens in our system, but not with hibernate, but by using composed, reproducable keys).
The question is: Will hibernate crash on @ManyToOne relationships which seem to be there but with no record in the @One part of the relationship? (basically an inconsistent database state).
I probably should solve this by removing the @ManyToOne relationship and simply map the foreign key to a String or so. I just wondered whether we can pull it off to leave the relationship in place..