-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate with sybase ASE
PostPosted: Tue Dec 28, 2004 9:52 am 
Newbie

Joined: Tue Dec 28, 2004 9:33 am
Posts: 1
Hi!

I'm using hibernate with Sybase ASE, I would like to recover data of my table department, but hibernate returns an error:

The column prefix 'area1_' does not match with a table name or alias name used in the query. Either the table is not specified in the FROM clause or it has a correlation name which must be used instead.


The generated query is:


select this.DEPARTMENT_ID as DEPARTME1_1_, this.NUMBER as NUMBER1_, this.AREA_ID as AREA_ID1_, area1_.AREA_ID as AREA_ID0_, area1_.COUNTRY_ID as COUNTRY_ID0_ from DEPARTMENT this left outer join AREA area1_ on this.AREA_ID=area1_.AREA_ID where 1=1


The mapping file is:


<hibernate-mapping package="fr.lunasquare.admin.prospect.logic.area">
<class name="Department" table="DEPARTMENT">
<id column="DEPARTMENT_ID"
name="Id"
type="integer">
<generator class="native" />
</id>
<property
column="NUMBER"
length="5"
name="Number"
not-null="true"
type="string"/>
<many-to-one

class="fr.lunasquare.admin.prospect.logic.area.Area"
name="Area"
not-null="true">
<column name="AREA_ID" />
</many-to-one>
</class>
</hibernate-mapping>


The hibernate file:


<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.username">sa</property>
<property name="show_sql">true</property>
<property name="dialect">
net.sf.hibernate.dialect.SQLServerDialect
</property>
<property name="use_outer_join">true</property>
...
</session-factory>
</hibernate-configuration>


I would like what's the matter with that error and how to solve it.

thanks !


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

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.