Hey,
One of the greatest things in hibernate that you dont need to deal with DB.
you are wotrking with object, like without the need to be aware to the DB,
but this is not exactly true.
For exmaple :
I have User with OneToOne to City.
In simple java code if i want to delete city all i need to do is:
city = null;
but in hibernate this is not enough. You need to delete all the reference to city, so you can not write just java code without the need to be aware to the ORM layer.
I thought to solve it by forbid to use in set null and obligant the developer to use in DAO for operations like this.
How do you guys solve issues like this?
Thank you
|