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

Reply via email to