-->
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.  [ 3 posts ] 
Author Message
 Post subject: SAXParseException while using composite-id
PostPosted: Sat May 30, 2009 2:02 am 
Newbie

Joined: Sat May 30, 2009 1:56 am
Posts: 2
Hi I am using composite-id for this table, not sure what is wrong but I am getting saxparseexception while loading bean.
Below is my mapping
<hibernate-mapping >
<class name="x.model.data.TimeTaken32" schema="x_DB" table="TIME_TAKEN_32">
<composite-id >
<key-property column="timestamp" type="timestamp" name="timestamp"/>
<key-property column="time_taken" type="long" name="timeTaken"/>
<key-many-to-one column="scenario_operation" name="scenarioOperation" class="x.model.data.ScenarioOperations" />
<key-many-to-one column="scenario_record" name="scenarioRecord" class="x.model.data.ScenarioRecords"/>
</composite-id>
</class>
</hibernate-mapping>

my table script is as below

CREATE TABLE time_taken_32
(
scenario_operation INTEGER NOT NULL,
scenario_record INTEGER NOT NULL,
timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
time_taken INTEGER NOT NULL,
FOREIGN KEY (scenario_operation) REFERENCES scenario_operations (id),
FOREIGN KEY (scenario_record) REFERENCES scenario_records (id)
);
Thank you for all the help.


Top
 Profile  
 
 Post subject: Re: SAXParseException while using composite-id
PostPosted: Sat Jun 06, 2009 1:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not sure how this relates to tools, but without the stacktrace its hard to tell you why you get the error.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: SAXParseException while using composite-id
PostPosted: Mon Jun 08, 2009 8:39 am 
Newbie

Joined: Sat May 30, 2009 1:56 am
Posts: 2
Thanks for all the replies, the error was not due to this xml but another xml which had bad mappings.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.