-->
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: could not find usertype
PostPosted: Wed Dec 17, 2003 12:55 pm 
Newbie

Joined: Wed Dec 17, 2003 12:31 pm
Posts: 9
Location: Kent, UK
Hi,

I've defined a class with name "uk.ac.cant.demo.Test" and referenced it in the definition for another class as the type of a property.

If I reference it using the fully qualified name, then I get an error in CodeGenerator (Could not find usertype "uk.ac.cant.demo.Test"), and in the generated class, it refers to the fully qualified name everywhere, but no import statement. If I reference it using just "Test" then I get the same error in CodeGenerator, and in the generated code, there is an "import Test;" statement, which obviously isn't valid Java.

Seeing as both classes are in the same package, how do I go about generating valid Java code?

Thanks in advance for your help

Richard


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 17, 2003 5:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I think you are trying to use a <property> mapping for something that should be a <many-to-one>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2003 5:38 am 
Newbie

Joined: Wed Dec 17, 2003 12:31 pm
Posts: 9
Location: Kent, UK
That works perfectly!

Thanks for the quick reply!


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.