From: Gavin K. <ga...@ap...> - 2002-11-19 13:32:04
|
Yes, I *have* thought of that, but it seems so .... model intrusive .... Not really in the spirit of the rest of our problem solutions .... Part of the reason I'm not really considering this issue a show stopper is that I really would prefer if people would use generated identifiers ;) ----- Original Message ----- From: "Doug Currie" <e...@fl...> To: "Gavin King" <ga...@ap...> Sent: Tuesday, November 19, 2002 9:49 AM Subject: Re: [hibernate - Open Discussion] RE: cascade save() problem in one-to-one rel > Gavin, > > Although I'm still not using Hibernate at my new job, I've been > lurking on the mailing lists. This question of saveOrUpdate() and > assigned identifiers seems to come up from time to time. > > Wouldn't it be possible to have a property that is not persisted, but > which flags the instance as persisted or not. It would be initially > false for transient instances, initially true for instances constructed > from the database, and set to true when the instance is saved (where > you'd normally assign the identifier). You'd only need this > additional property for classes with assigned identifiers that needed > the saveOrUpdate() capability. > > I have no need for this myself, but seeing "theres nothing we can > really do to improve it..." always gets my attention for a moment! > > Regards, > > e > > > Read and respond to this message at: > > https://sourceforge.net/forum/message.php?msg_id=1760812 > > By: oneovthafew > > > Nah, you just have to accept the fact that saveOrUpdate() can't really work > > with assigned identifiers. It will always save or always update. The same comment > > applies to the semantics of cascaded save-update. > > > This is just a limitation of using assigned identifiers and theres nothing we > > can really do to improve it... |