Persistance Heritage Hibernate
Bonjour,
je pense qu'il est preferable que je vous epargne les details, donc je vais en venir au fait. Voici mon fichier de mapping:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="mpower_hibernate.XacmlPolicy" table="XacmlPolicies" discriminator-value="POLICY">
<id column="POLICY_ID" name="id" type="long">
<generator class="native"/>
</id>
<discriminator column="TYPE" type="string"/>
<property column="DESCRIPTION" name="description" type="string"/>
<property column="ACTION" name="action" type="string"/>
<property column="RESOURCE" name="resource" type="string"/>
<property column="PENDING" name="isPending" type="boolean"/>
<subclass name="mpower_hibernate.XacmlDataPolicy" discriminator-value="DATAPOLICY">
<many-to-one class="mpower_hibernate.User" column="SUBJECT_ID" name="subject"/>
<many-to-one class="mpower_hibernate.User" column="USER_ID" name="elderly"/>
</subclass>
<subclass name="mpower_hibernate.XacmlMethodPolicy" discriminator-value="METHODPOLICY">
<many-to-one class="mpower_hibernate.Role" column="ROLE_ID" name="role"/>
</subclass>
</class>
</hibernate-mapping> |
Lors de la creation de la database, voici le message d'erreur:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
SEVERE: Unsuccessful: create table XacmlPolicies (POLICY_ID number(19,0) not null, TYPE varchar2(255 char) not null, DESCRIPTION varchar2(255 char), ACTION varchar2(255 char), RESOURCE varchar2(255 char), PENDING number(1,0), SUBJECT_ID number(19,0), USER_ID number(19,0), ROLE_ID number(19,0), primary key (POLICY_ID))
SEVERE: ORA-00904: : invalid identifier
SEVERE: Unsuccessful: alter table XacmlPolicies add constraint FK30625A0984B2037C foreign key (SUBJECT_ID) references Users
SEVERE: ORA-00942: table or view does not exist
SEVERE: Unsuccessful: alter table XacmlPolicies add constraint FK30625A09F8F3309D foreign key (ROLE_ID) references Roles
SEVERE: ORA-00942: table or view does not exist
SEVERE: Unsuccessful: alter table XacmlPolicies add constraint FK30625A099E1DF47D foreign key (USER_ID) references Users
SEVERE: ORA-00942: table or view does not exist |
Toutes mes classes sont concretes, je souhaite etablir une approche SINGLE_TABLE. La ou je ne suis pas sur, c'est le discriminant pour ma classe de base...
Merci de m'apporter de l'aide, s'il vous plait.
Babas007