|
From: <jue...@we...> - 2004-07-15 13:15:08
|
Colin, =20 What about simply invoking =20 getHibernateTemplate().setAllowCreate(false); =20 in the initDao implementation of your subclass? =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Colin Sampaleanu Gesendet: Do 15.07.2004 05:34 An: spr...@li... Betreff: [Springframework-developer] HibernateDaoSupport Juergen, The existing code in HibernateDaoSupport created a HibernateTemplate with the allowCreate flag as true by default, and as the setSessionFactory method where the template was created was final, there was no way to override this. I have created a protected field called defaultTemplateAllowCreateValue (true by default to maintain existing behaviour), which a user HibernateDaoSupport subclass may override. Additionally, I have added a setter for this default value, so a DAO instance can be set to true or false specifically (without having to subclass). This value does not affect any HibernateTemplate passed in explicitly. Colin ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |