﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>Peter,
  
Not really. It is not something that you would use for everything, but it is something that can be extremely useful in many aspects.
  
In particular, it can make certain tasks that would require you to write SQL so much easier.
  
Since obviously there is a disconnect between those sort of operations and in memory ones, it is pretty clear what is going to happen
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment15</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment15</guid><pubDate>Sat, 30 May 2009 14:38:11 GMT</pubDate></item><item><title>Peter Morris commented on NHibernate – Executable DML</title><description>@Ayende
  
  
That's my point.  When you first use some DML in an app there might not be side affects, but later on some may be introduced and the DML will bypass them.
  
  
I'm just pointing out that this is really something I think should be used in moderation, and with great care :-)
  
  
  
Regards
  
  
Pete
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment14</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment14</guid><pubDate>Sat, 30 May 2009 10:10:31 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>Krzysztof,
  
No, it will not.
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment13</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment13</guid><pubDate>Fri, 29 May 2009 22:08:57 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>Peter,
  
Um, don't use that that if you care about the setter side affects?
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment12</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment12</guid><pubDate>Fri, 29 May 2009 22:08:25 GMT</pubDate></item><item><title>Gunnar Liljas commented on NHibernate – Executable DML</title><description>Deletes also work
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment11</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment11</guid><pubDate>Fri, 29 May 2009 21:00:10 GMT</pubDate></item><item><title>pete w commented on NHibernate – Executable DML</title><description>This is major!
  
  
Good to know. En-masse updates has always been the achilles heel of ORMs. I write stored procedures for this kind of thing, and then invalidate all caches/sessions after the fact.
  
  
What would be nice is to do the same thing for en-masse deletes. Large-scale deletions are a common use case and it would be nice to do without loading each object, or falling back on a SPROC.
  
  
Nice work fabio! thank you for all the help, you rock
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment10</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment10</guid><pubDate>Fri, 29 May 2009 13:08:31 GMT</pubDate></item><item><title>Krzysztof Kozmic commented on NHibernate – Executable DML</title><description>would that work with criteria as well?
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment9</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment9</guid><pubDate>Fri, 29 May 2009 09:08:41 GMT</pubDate></item><item><title>Peter Morris commented on NHibernate – Executable DML</title><description>What if someone later adds setter code to o.Name?  What if the data update breaks invariants?
  
  
I assume this is something which should really be used quite rarely.
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment8</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment8</guid><pubDate>Fri, 29 May 2009 08:30:21 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>Andrey,
  
Because the strings are the simplest thing that work, and anything else turned out to be way too much hassle
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment7</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment7</guid><pubDate>Fri, 29 May 2009 00:17:53 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>Andres,
  
Those things are happening in the database, outside of NHibernate. We don't want to update the session cache, it would be incredibly complex, and break the state equality between NH &amp; the DB
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment6</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment6</guid><pubDate>Fri, 29 May 2009 00:05:31 GMT</pubDate></item><item><title>Andrey Shchekin commented on NHibernate – Executable DML</title><description>Looks good (actually more like a mandatory feature, at least for updates). But why you use string-based HQL so often in your samples? From the author of NHQG this is surprising.
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment5</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment5</guid><pubDate>Fri, 29 May 2009 00:03:34 GMT</pubDate></item><item><title>Andres G. Aragoneses commented on NHibernate – Executable DML</title><description>So this is not HQL?
  
  
How complex would it be to try to make NHibernate update the session cache? Would that kill performance?
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment4</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment4</guid><pubDate>Fri, 29 May 2009 00:01:53 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate – Executable DML</title><description>As Fabio said, this does NOT affect the session cache, but it DOES affect the 2nd level cache.
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment3</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment3</guid><pubDate>Thu, 28 May 2009 23:00:56 GMT</pubDate></item><item><title>Fabio Maulo commented on NHibernate – Executable DML</title><description>The session-cache is not affected because executable queries are not loading entities.
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment2</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment2</guid><pubDate>Thu, 28 May 2009 22:53:12 GMT</pubDate></item><item><title>len smith commented on NHibernate – Executable DML</title><description>This is amazing.
  
  
How does this affect objects in the first-level cache?  Are they all automatically updated or evicted from the session?
</description><link>http://ayende.com/4037/nhibernate-executable-dml#comment1</link><guid>http://ayende.com/4037/nhibernate-executable-dml#comment1</guid><pubDate>Thu, 28 May 2009 22:00:50 GMT</pubDate></item></channel></rss>