-->
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.  [ 2 posts ] 
Author Message
 Post subject: "table or view does not exist" in table-per-subcla
PostPosted: Tue Jun 01, 2004 10:23 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 11:32 am
Posts: 32
I am implementing table-per-subclass mapping and have been following the documentation but I am having the following problem and would appreciate if someone could point out the problem :

I have 4 classes BasePlan, BaseAccount, DBAccount ,DCAcoount. DBAccount and DCAccount inherit from BaseAccount. BasePlan contains a collection of accounts.(BasePlan is itself a collection in the Employee object but i dont have any problem in fetchin it)

My mappings are as follows:

<class
name="BasePlan"
table="BASE_PLAN"
>

<id
name="planId"
type="int"
column="PLAN_ID"
>
<generator class="assigned" />
</id>


<!-- bi-directional one-to-many association to BaseAccount -->
<set
name="accounts"
lazy="true"
inverse="true"
>
<key>
<column name="PLAN_ID" />
</key>
<one-to-many
class="BaseAccount"
/>
</set>

</class>



<class
name="BaseAccount"
table="BASE_ACCOUNT"
>

<id
name="accountId"
type="java.math.BigDecimal"
column="ACCOUNT_ID"
>
<generator class="assigned" />
</id>




<many-to-one name="BasePlan"
column="PLAN_ID"
class="BasePlan"/>


<joined-subclass name="DbAccount" table="DBACCOUNT">
<key column="ACCOUNT_ID"/>

<property
name="currentBalance"
type="float"
column="CURRENT_BALANCE"

/>
</joined-subclass>

<joined-subclass name="DcAccount" table="DCACCOUNT">
<key column="ACCOUNT_ID"/>
</joined-subclass>

</class>



On trying to retrieve the collection of accounts from a plan object I get

10:01:37,171 ERROR JDBCExceptionReporter:38 - could not initialize collection: [lBasePlan.accounts#1]
java.sql.SQLException: ORA-00942: table or view does not exist

The above mentioned tables do exist in the database.


TIA

splash


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 01, 2004 10:29 am 
Newbie

Joined: Tue May 25, 2004 11:20 am
Posts: 17
Location: Munich, Germany
You should activate SQL logging to see the generated SQL. Then you can see the missing tablename.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.