-->
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: Mapping a class hierchy as a component of a another class
PostPosted: Tue Sep 19, 2006 11:33 am 
Newbie

Joined: Tue Sep 19, 2006 11:22 am
Posts: 1
I’m stuck with a pre-defined object model and database schema and cannot get the Hibernate mapping to work.

Example of my pre-defined Object Model

public class Provider {
private long providerId;
private String comment;
private Signature signature;
private String issueDate; }

public abstract class Signature {
}

public class SignatureText extends Signature {
private String text; }

public class SignatureOther extends Signature {
private String other;
private String authority; }

public class SignatureSecondary extends Signature {
private String secondary;
private String permission;}

Example of my pre-defined database schema

PROVIDER_TABLE::
Provider_Id : NUMBER
Comment: VARCHAR2
Signature_Text: VARCHAR2
Signature_Other: VARCHAR2
Signature_Authority: VARCHAR2
Signature_Secondary: VARCHAR2
Signature_Permission: VARCHAR2
Issue_Date: TIMESTAMP

I’m only stuck on trying to map the Signature part of this model and cannot change the object model nor the database schema.

Please provide an example for this mapping if it is at all possible.


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.