I guess it would be easily possible to turn the cache *off*. But what do you do about circular references?
You get exposed to stack overflows w/o a cache. |---------+-------------------------------------------> | | Andrea Aime <[EMAIL PROTECTED]> | | | Sent by: | | | [EMAIL PROTECTED]| | | ceforge.net | | | | | | | | | 14/08/03 04:55 PM | | | | |---------+-------------------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: hibernate list <[EMAIL PROTECTED]> | | cc: | | Subject: [Hibernate] Session-less OR-mapping | >------------------------------------------------------------------------------------------------------------------------------| Hi Gavin, hi everybody, working on an application that needs to manage lots of objects/records, I'm wondering if it would be difficult to have a session-less or-mapping, that is, something that just enables HQL, transactions, statement caching and batching withouth putting objects in the session cache, no callbacks, no cascades. There are time when I'd like to do mass deletes, or another example where I have to insert 200.000 objects into the database, where the session cache is a royal pain performance and memory wise. I know your standard answer, just do it with direct sql, but consider that: * direct sql needs the real table and column names (I have to go back and look at the mapping to see what are the real column names since often I cannot keep the java name in the sql) * the code is mixed, thus a bit more difficult to use; * the same code throws both HibernateException and SQLException and they need to be catched separately; * I have to implement by hand batching, creating the prepared statements, and so on So, using direct SQL _is_ faster, but I loose much convenience and I have to do work that should be performed by the OR mapping tool. Do you think it's too complicated to have another option, a cache-less behaviour? If you can give pointers on how to implement it I try to code it myself (for the next project, since this one already use hand-made statements, but I like to see Hibernate become more flexible) Best regards Andrea Aime ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel ********************************************************************** Any personal or sensitive information contained in this email and attachments must be handled in accordance with the Victorian Information Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 (Commonwealth), as applicable. This email, including all attachments, is confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this email or attachments. Any confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies. ********************************************************************** ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel