-->
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: Problem mapping composite id
PostPosted: Mon Jun 21, 2004 12:06 pm 
Newbie

Joined: Mon Jun 21, 2004 11:56 am
Posts: 8
The following is the table i am trying to map

TABLE: VEHICLE
COLUMNS:
MARKET(PK)
SYSTEM_ID(PK)
YEAR(PK)
MODEL_CODE(PK)
START_DATE(PK)
END_DATE(PK)
AMOUNT
...... and so on

This table already exists and I have no control over changing it.

Similarly, I already have objects defined and cannot change those either becoz they are used by different teams.

This is the object i want to map it to
public class Vehicle extends RulesCommon {
private String market = null;
private int programId = 0;
private String modelYear = null;
private String bodyModel = null;
private DateRange range = new DateRange();
private double payment = 0.0;
... etc...
}

public class DateRange
{
private Date startDate = null;
private Date endDate = null;
.... methods.....
}

As u can see above, the vehicle object has a primary key which is composite, of which part of it (DateRange) is in another object.

I tried different things but nothing worked. Any help would be appreciated.

Thanks


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.