From: Gavin K. <Gav...@ex...> - 2003-01-01 23:20:57
|
Well, I imported the Hibernate2 sourcetree last night. Its in its own module which means that for the next couple of months we need to be *very* careful about handling patches. Bugfixes and minor improvements must be applied against *both* trees. (New features need only go into the Hibernate2 module.) As promised, the following changes were made: * packages are now net.sf.hibernate.* * project structure is changed; all java is now in src dir * code and tests relating to toplevel collections and=20 subcollections was removed I have created a new hibernate-mapping-2.0.dtd, since we no longer need the <collection>, <subcollection>, <generated-key> elements and since collections may no longer appear beneath the root element. In the new DTD, I have also renamed the 'readonly' attribute=20 to 'inverse', since its name was causing all kinds of confusion=20 for new (and not-so-new) users. Please vote on the following proposals: * Rename the 'role' attribute to 'name' in all collection elements in the new DTD, for consistency with <many-to-one>,=20 <id> and <property> elements. The role attribute no longer has any extra semantics beyond being a simple property name. I am +1 * Change the default for unsaved-value to "null" in the new=20 DTD. The current default is surprising to new users. I am +1 * Change the default for default-cascade to "save-update" in the new DTD. I am undecided ... interested to hear the views of others. * 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.=20 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. None of the above proposals would break existing code that uses the old mapping DTDs. The actual changes to default values can be made just in the DTD. Gavin. ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: Christian B. <chr...@bl...> - 2003-01-02 08:39:11
|
On 02 Jan (10:20), Gavin King wrote: > In the new DTD, I have also renamed the 'readonly' attribute > to 'inverse', since its name was causing all kinds of confusion > for new (and not-so-new) users. +1 :) > * 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. ++ > * Change the default for unsaved-value to "null" in the new > DTD. The current default is surprising to new users. ++ > * Change the default for default-cascade to "save-update" > in the new DTD. > > I am undecided ... interested to hear the views of others. This would be too much like "persistence by reachability" by default. This should be optional. -- Christian Bauer tu...@in... |
From: Konstantin P. <kpr...@ya...> - 2003-01-02 09:06:36
|
> Please vote on the following proposals: > > * 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 +1000 > * Change the default for default-cascade to > "save-update" > in the new DTD. > > I am undecided ... interested to hear the views of > others. From my point of view, some 50% I need save-update, sometimes none... regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
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" :) |
From: Max R. A. <ma...@eo...> - 2003-01-02 12:23:04
|
forgot one... >* 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 I would suggest the same mechanism as with delete - it is nice to have it as an option. /max |