-->
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: UserType - actual type doesn't appear in generated class
PostPosted: Tue Apr 11, 2006 9:22 am 
Newbie

Joined: Mon Apr 10, 2006 10:33 am
Posts: 7
Location: LA
I was told this was a Tools issue so here goes:

Hibernate version:3

I attempted to follow the UserType example in "Hibernate: A Developer's Notebook" to implement my own UserType...

I can supply code if it would help but my question is a simple one:

In the mapping document the UserType classname is used (type="myClassType" let's say)

but when I generate code from the mapping doc the properties that use the "myClassType" appear as "myClassType" not as "myClass"

i.e.
Code:
private myClassType myproperty;


instead of
Code:
private myClass myproperty;


I thought my UserType was set up correctly and that this section of code was supposed to deal with this issue:
Code:
public Class returnedClass() {
           return myClass.class;
       }//end Class


(if I go through and manually replace "myClassType" with "myClass" in the generated code, everything seems to work [at least querying FROM the database] but that requires manually fixing it EVERY time I generate code)

Has there been some kind of change from version 2 to version 3 that would cause this?

P.S. Also my Hibernate Configuration in Eclipse is complaining about the "myClassType" - but I don't know how to fix THAT one manually[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 4:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
tp allow the tools to use a class (the usertype class) that class has to be in the classpath.

for ant it is done via <classpath> and in the plugins by adding it to the console configuration classpath.

_________________
Max
Don't forget to rate


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.