-->
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.  [ 2 posts ] 
Author Message
 Post subject: Custom User Types, materialize? and VO questions
PostPosted: Tue Aug 10, 2004 5:07 pm 
Newbie

Joined: Tue Aug 10, 2004 4:41 pm
Posts: 1
Hibernate version:
2.0.3

Name and version of the database you are using:
Oracle 9.2

QUESTION #1

I am using custom Type that extends Hibernate String Type with hibernate against a Oracle database. The column in the database is represented as VARCHAR2. I am specifying StringType.

The Custom type has following setter and getter methods.

public CustomType getType(){ return CustomType;};

public void setType(CustomType customType) {
this.customType = CustomType};

When I persist, I didn't see rows created in the database sofar. But anyway the bigger problem seems to be when Saving the object it may be accepting StringType in the mapping file. But while retrieving, it looks like Hibernate is trying to construct the object using setter with the Type and compaining that the setType expects a CustomType argument but it is receiving a StringType. Any thoughts on how to tackle this problem?

I have changed the argument to accept String and am constructing Custom Type looking at the String coming back. Is that the recommended solution?


QUESTION #2

2004-08-10 16:52:06 DEBUG SessionImpl.initializeEntity(2222) - done materializing entity [com.aol.ic.art.data.vo.ProductVO#2]

Does the above statement means that the Object is retrieved using the Database row? If that is true, I am not seeing the object coming back.

Question # 3


WorkVO.java is a VO mapped to WORK table

It has the methods for mapping Authors

Set getAuthors();
void setAuthors(Set Authors){}

Should I pass "Set Authors" as an argument to WorkVO constructor?
If not, how could I populate WORK_AUTHOR link table?

Data Model has
WORK Table
AUTHOR_WORK Table--> many-to-many mapping table
AUTHOR Table


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 11:54 pm 
Beginner
Beginner

Joined: Mon Aug 09, 2004 12:31 pm
Posts: 47
Location: New York, NY, USA
Please post your mapping file and actual Java source code between openSession and close().


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.