Contributor |
|
Joined: Thu Nov 06, 2003 9:49 pm Posts: 104 Location: New York, NY
|
Another difference is that the code in your mapped objects will have to account for the fact that fields get set by code outside of the class. This means that an instance can be in a state that cannot be produced by the constructors and setters. This can make for some pretty strange bugs.
I've used ORMs that do both, and I prefer Hibernate's default behavior. I also prefer to put validation logic in business session objects. In the end, it's just a more maintenance friendly design, IMHO.
|
|