-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: hSql error: outer or full join must be followed by path exp.
PostPosted: Wed May 10, 2006 7:15 pm 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
I get the following error when I attempt to run the following Hsql query.

NHibernate.QueryException : outer or full join must be followed by path expression [SELECT Project.ProjectName FROM Com.Dynawise.WellAccelerator.Domain.Project Project JOIN Com.Dynawise.WellAccelerator.Domain.ProjectClass]


My mapping file looks likethe following. What am I missing?

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="Com.Dynawise.WellAccelerator.Domain" namespace="Com.Dynawise.WellAccelerator.Domain">
<class name="Project" table="PROJECT">

<id name="ProjectId" column="PROJECT_ID" type="Int64" unsaved-value="0">
<generator class="native"/>
</id>
<property name="ProjectName" column="PROJECT_NAME"/>

<many-to-one name="ProjectType" column="PROJECT_TYPE_ID" class="ProjectType" />

<bag name="ProjectClasses" table="PROJECT_CLASS_XREF" cascade="all" outer-join="true">
<key column="PROJECT_ID" />
<many-to-many column="PROJECT_CLASS_ID"
class="Com.Dynawise.WellAccelerator.Domain.ProjectClass, Com.Dynawise.WellAccelerator.Domain" />
</bag>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 11:51 pm 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
Please disregard. I figured out what i was doing wrong...

Thanks


Top
 Profile  
 
 Post subject: NHibernate.QueryException: outer or full join must be follow
PostPosted: Tue Jul 15, 2008 3:24 am 
Newbie

Joined: Sun May 18, 2008 1:21 pm
Posts: 13
Can you please explain what you figer out in your code. because i am also stuck in this issue


Top
 Profile  
 
 Post subject: Re: NHibernate.QueryException: outer or full join must be fo
PostPosted: Tue Jul 15, 2008 7:18 pm 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
zafarjcp wrote:
Can you please explain what you figer out in your code. because i am also stuck in this issue


Hi... Not sure I can remember exactly what I did to fix this issue.
The application has evolved quite a bit since then.
Here is the HQL as it is today:
Code:
string hsqlQuery =
                "SELECT p.ProjectName, c.BottomHoleLocation, p.Id, c.EventSequence, c.EventLocation, c.ProjectAfe, s, j, o, pd, p, p.IsArchived " +
                " FROM Project p " +
                " INNER JOIN p.ProjectClasses c " +
                " LEFT JOIN p.Strike s " +
                " LEFT JOIN p.Jurisdiction j " +
                " LEFT JOIN p.OperatingTeam o " +
                " LEFT JOIN c.Product pd " +
                " INNER JOIN c.BottomHoleLocation bh ";


Here are the mapping files. Hope this helps...
Project
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" Assembly="Domain" namespace="Domain">
     <class name="Project" table="PROJECT">
     <id name="Id" access="field.pascalcase-underscore" column="PROJECT_ID" type="Int64" unsaved-value="0">
         <generator class="native"/>
     </id>
     <property name="ProjectName" access="field.pascalcase-underscore" column="PROJECT_NAME" length="50"/>
     <many-to-one name="ProjectType" access="field.pascalcase-underscore" column="PROJECT_TYPE_ID" class="ProjectType" />
    <many-to-one name="OperatingTeam" access="field.pascalcase-underscore" column="OperatingTeamId" class="OperatingTeam"/>
    <many-to-one name="Strike" access="field.pascalcase-underscore" column="Strike_Id" class="Strike"/>
    <many-to-one name="Jurisdiction" access="field.pascalcase-underscore" column="Jurisdiction_Id" class="Jurisdiction"/>
    <property name="ArchiveComments" access="field.pascalcase-underscore" column="ArchiveComments" length="255"/>
    <property name="IsArchived" access="field.pascalcase-underscore" column="IsArchived" />
    <many-to-one name="ArchiveStatus" access="field.pascalcase-underscore" column="ArchiveStatusId" class="ArchiveStatus" />


    <bag name="HistoryEntries" cascade="all-delete-orphan" access="field.pascalcase-underscore" inverse="true">
      <key column="ProjectId" />
      <one-to-many class="HistoryEntry" />
    </bag>

    <bag name="ProjectClasses" cascade="all-delete-orphan" access="field.pascalcase-underscore">
      <key column="ProjectId" />
      <one-to-many class="ProjectClass" />
    </bag>
   
   </class>
 
</hibernate-mapping>


Project Class
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"
                   assembly="WellAccelerator.Domain" namespace="WellAccelerator.Domain">
 
   <class name="ProjectClass" table="PROJECT_CLASS" discriminator-value="PC" lazy="false">

      <id name="Id" access="field.pascalcase-underscore" column="PROJECT_CLASS_ID" type="Int64" unsaved-value="0">
         <generator class="native"/>
      </id>
   
    <discriminator column="CLASS_CODE" type="String" length="4"/>

    <many-to-one name="Project" class="Project" column="ProjectId"  access="field.pascalcase-underscore"/>
   
      <property column="PROJECT_CLASS_TYPE"
            type="WellAccelerator.Domain.ProjectClassCode, WellAccelerator.Domain"
      name="ProjectClassCode" access="field.pascalcase-underscore" not-null="true"
    />

    <bag name="Contacts" access="field.pascalcase-underscore" table="ProjectContact" cascade="all" lazy="false">
      <key column="ProjectClassId" />
      <one-to-many class="Domain.ProjectContact, Domain"  />
    </bag>
   
    <many-to-one name="ProjectAfe" access="field.pascalcase-underscore" class="ProjectAfe" column="ProjectAfeId" cascade="save-update"/>
    <many-to-one name="Product" access="field.pascalcase-underscore" column="ProductId" class="Product"/>
     
    <many-to-one class="LegalLandDescription" name="SurfaceLocation" access="field.pascalcase-underscore" cascade="all"/>

  </class>
</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.