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)
);
|