-->
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: Object of class [org.alllearn.model.Student] with identifier
PostPosted: Tue May 17, 2005 2:02 pm 
Newbie

Joined: Tue May 17, 2005 1:48 pm
Posts: 3
Location: New York
I tried to use uuix.hex when I generate id. I am using spring, oracle 9i, hibernate.
I have error when i tried to save new student record into database.
Here is error:
"Object of class [org.alllearn.model.Student] with identifier []: not found "

In oracle, I use trigger that generate id using SYS_GUID()

How can I do it?


<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="org.alllearn.model.Student"
table="STUDENT"
>

<id
name="id"
type="java.lang.String"
column="ID"
length="32"
>
<generator class="uuid.hex"/>
</id>

<property
name="customerId"
type="java.lang.Long"
column="CUSTOMER_ID"
unique="true"
length="22"
/>


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.