-->
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: Joined-subclass problem with changing type parent2child PLS
PostPosted: Sun Jul 13, 2008 6:21 am 
Newbie

Joined: Sun Apr 06, 2008 2:49 pm
Posts: 17
Hi,

I have a class

A

and class B

B : A

A has normall class mapping
B has joined-sublcass mapping..

Everything goes OK - I can create A, create B, update A, update B ...

The urgent problem is when I load A and I create B basing on it for example making B something = (B)A;

When I want to update B, it says that there is no row with specified id,
I cant create A, it already exists, update A because B is not created then, create B because something else occurs.


IMPORTANT: There are two tables in database related one to one with the same primary key


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 14, 2008 2:58 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Quote:
The urgent problem is when I load A and I create B basing on it for example making B something = (B)A;


I don't exactly now what you mean with "create". In your example you just cast am A to a B which will work if A is basically a B, but then no B will be "created". Can you post the code where you load and update the A/B's ?

_________________
--Wolfgang


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.