• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

joined-subclass problem

 
Manoj Raghuwanshi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm attempting to do a joined-suclass and I get the following error:
ERROR: relation "software" does not exist

generated sql is -

select this_.id as id0_, this_.name as name0_0_, this_.description as descript3_0_0_, this_.price as price0_0_,
this_.supplierId as supplierId0_0_, this_1_.version as version1_0_,
case when this_1_.productId is not null then 1 when this_.id is not null then 0 end as clazz_0_
from Product this_ left outer join Software this_1_ on this_.id=this_1_.productId where this_.name=?

Here are snippets (whole hbm is too long) from my hbm:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="com.hibernatebook.criteria">
<joined-subclass name="Software" extends="Product">
<key column="productId"/>
<property name="version" type="string"/>
</joined-subclass>
</hibernate-mapping>


I m useing Postgresql. I guess physical table Software is not actually required.

I'm at a loss, if anybody knows what I'm doing wrong, I'd greatly appreciate the help.


Manoj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic