-->
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: inheritance mapping problem
PostPosted: Tue Oct 26, 2004 3:43 pm 
Newbie

Joined: Wed Oct 06, 2004 4:15 am
Posts: 16
Hibernate version:

2.1.6


Hi All,

Since Hibernate doesn't allow to mix inheritance strategies (i.e. having a joined-subclass and after a subclass...), I have moved my initial idea of mixed inheritance to a joined-subclass strategy.

So the three concepts are like this (Entity, Node(inherits from entity) and State(inherits from node)).

The problem is between node and state, because I have defined an id (ID_NODE), but hibernate does not support an "id" element into a joined-subclass declaration, and, without that, there is no way I can link the state to the node.

Any hints would be greatly appreciated.

Kind regards

Carlos

CREATE TABLE WFMS_ENTITIES(
ID_ENTITY NUMBER(20) NOT NULL,
NAME VARCHAR2(100) NOT NULL,
CONSTRAINT PK_WFMS_ENTITIES PRIMARY KEY(ID_ENTITY);
);


CREATE TABLE WFMS_NODES(
ID_NODE NUMBER(20) NOT NULL,
ENTITY NUMBER(20) NOT NULL,
CONSTRAINT PK_WFMS_NODES PRIMARY KEY(ID_NODE),
CONSTRAINT FK_WFMS_NODES_ENTITY FOREIGN KEY(ENTITY) REFERENCES WFMS_ENTITIES(ID_ENTITY)
);

CREATE TABLE WFMS_STATES(
NODE NUMBER(20) NOT NULL,
SWIMLANE NUMBER(20) NOT NULL,
CONSTRAINT FK_WFMS_STATES_NODE FOREIGN KEY(NODE) REFERENCES WFMS_NODES(ID_NODE)
);


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.