<p>I'm pretty new to HQL (well, nHibernate in general) and am currently building a simple app to learn more about it.</p>

<p>I've run into problems trying to express the following SQL as HQL though, and would be very grateful for any ideas.</p>

<p>Here's the query:</p>

<pre><code>select * from parent p
where p.id in (select p.parentid from child c where c.createdby = 2)
and
(select top 1 createdby 
 from child where parentid = p.id order by createdon desc) != 2
</code></pre>

You can get rid of this attribute, or set it to false (which is the default).
AutoEventWireup means ASP.NET will use reflection at runtime to look for methods on your web form class in the form of Page_EventName (like Page_Load, Page_Init, etc), and automatically wire the methods to the corresponding page lifecycle events. I have some more details here:
http://odetocode.com/Blogs/scott/archive/2006/02/16/2914.aspx
In MVC you should, as a general rule, avoid wiring up event handlers for the page lifecycle and code-behind in general.