From: Max R. A. <ma...@eo...> - 2003-01-02 12:20:05
|
Just quick comments before i go on a 2 day without net :( >* Rename the 'role' attribute to 'name' in all collection > elements in the new DTD, for consistency with <many-to-one>, > <id> and <property> elements. The role attribute no longer > has any extra semantics beyond being a simple property > name. >I am +1 +1 >* Change the default for unsaved-value to "null" in the new > DTD. The current default is surprising to new users. >I am +1 +1 >* Change the default for default-cascade to "save-update" > in the new DTD. >I am undecided ... interested to hear the views of others. Don't think there are any good default...How about forcing an save-update attribute on the global level, so they are forced to make a choice ? (just a thought) >* Remove the exception that occurs if you save an object > that is already associated with the session. This > makes save() consistent with saveOrUpdate(). I am probably a +1 on this >* Remove the exception that occurs if you delete an object > that is already deleted in that session. >I am undecided. The current behaviour forces people to >think about who "owns" an object, who is responsible for >deleting it. However, it *can* be a pain in the ass. >In particular it means that: >session.delete("from o in class java.lang.Object"); >never has any possibility of success if you use cascade >delete anywhere. Im also undecided - I REALLY like having the developers think about ownership. How about having it as an option on either the method call or in the metadata ? delete(Object o, boolean beSilentAboutCollisions) so: session.delete(o) is the same as session.delete(o, false); or Session.setBeSilentAboutDelteCollisons(boolean) - so it can be set on each session ? (so - one can easily enable it to see if ones code is "nice" or "bad" :) |