From: Yaron Z. <ya...@id...> - 2002-08-30 21:21:35
|
Hi, On an earlier post, Gavin proposed to follow my proposal and make an API modification - there were no objections for that. I would like to understand what is the next step. If there is an issue with implementing the change, I hereby volunteer to implement it. Assuming I will make the modification soon, is there a chance to get it into 1.1? Thanks, Yaron. ---------------------------------------------------------------------------- ----------------------------- Quote from Gavin http://sourceforge.net/forum/forum.php?thread_id=722838&forum_id=128638 Yaron Zakai makes a suggestion I quite like. I've seen that new users often have trouble realizing they need to use insert() instead of save() when they want to use application-assigned ids. People seem to expect that the "assigned" id generator will just use the existing id of an object when you call save(). Secondly, some people would like insert() to cascade to insert(). Whereas other times insert() to save() is appropriate. So I would like to deprecate the following methods: Session.insert(Object) Session.insert(Object, Serializable) and add the following method Session.save(Object, Serializable) (which does exactly what Session.insert(Object, Serializable) used to do.) Then we would deprecate the IDGenerator interface and replace it with: public interface IdentifierGenerator { public Serializable generate(SessionImplementor session, Object entity) throws ..... ; } |