Is there any equivalent to LIMIT or TOP in HQL? As i need to use it in a named query such as the one in this mappying:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
   <class name="vcf.code.entites.stats.Visit,vcf" table="vcfVisit">
      <id name="Id" column="id" type="Int32" unsaved-value="0">
         <generator class="native"/>
      </id>
      <property column="visited_id" type="Int32" name="VisitedCode" not-null="true" />
      <property column="visitor_code" type="Int32" name="VisitorCode" not-null="true" />
      <property column="timestamp" type="DateTime" name="Timestamp" not-null="true" />
      <property column="type" type="String" name="Type" not-null="true" length="1" />
      
   </class>
   
   <query name="Visit.GetLastest">top 1 from Visit where VisitorCode = ? order by timesstamp DESC</query>
   
</hibernate-mapping>
I need to use a named query i cannont use the querying objects.