I have had the same problem it looks to be a problem in the superclass of the SqlSelectStatement.java, if you use the extends in the class-descriptor then you will get an exception to show where the issue is. I have a possible solution but I need to test the code first.
-kurt "prime factory: Thorsten Harders" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am having problems with odmg queries in an inheritance hierarchy. > I get wrong sql generated, when I query a subclass with attributes in > the parent class. > > I build a class hierarchy like the one in the tutorial 3 (inheritance: > mapping classes on multiple joined tables) > http://db.apache.org/ojb/tutorial3.html#mapping%20classes%20on%20multiple%20joined%20tables > > > So I tried this example with a similar query and the same problem appears! > > Query: > select allobjects from " + B.class.getName()+ " where someValueFromA < 10 > > Will result in the following SQL: > SELECT A0.VALUE_B,A0.ID FROM B_TABLE A0 WHERE someValueFromA < 10 > > But I expected something like this... > SELECT A0.VALUE_B,A0.ID FROM B_TABLE A0, A_TABLE A1 > WHERE A0.ID = A1.ID AND A1.VALUE < 10 > > Is the mapping in the example wrong? > Or is it a bug in the SQL generation? > > > By the way, I am using ojb with postgres and jdk1.4. > > Any help appreciated! > > Thanks... > > Thorsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
