-->
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: having a field used in two sub-classes of a single hierarchy
PostPosted: Sun Aug 23, 2009 2:30 am 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
Hibernate Core: 3.2.2.ga
Hibernate Annotations: 3.3.0.GA
Hibernate EntityManager: 3.3.1.GA

We have a single class per hierarchy mapping with a super class and more than 10 sub-classes, some of the sub-classes map the same column on database, when executing a select query on the super-class the aliases created for the column is the same, so by applying pagination on oracle "column ambiguously defined" occurs.

Code:
@Entity
class A{
}

@Entity
class B extends A {
   @Column(name = "a")
   private String a;
   ...
}

@Entity
class C extends A {
   @Column(name = "a")
   private String b;
   ...
}

class D extends A {
// no mapping of column "a"
}


now querying on the A creates a query with duplication alias.

What shall I do? Is it a but and must be reported in Hibernate Jira?

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


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.