-->
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: v3.3.0 - hbm to POJO requires POJO's?
PostPosted: Fri Jan 14, 2011 11:44 am 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
Hi!

I installed Hibernate Tools 3.3.0 into Eclipse 3.6.0 and set up a new Hibernate config and mapping file.

In the mapping I defined a new Class named Foo and tried to use the "Hibernate Code Generation" tool to create the POJO's, using the "Domain code (.java)" exporter.

But it complains:
class Foo not found while looking for property: some_property

It seems I have to create the POJOs manually.

Am I overlooking something obvious?

I would like to write the mappings (using the GUI editor) and then generate Java classes and DDL by the tool.
Is there a tutorial for this?

Should I use the ant task?


PS: The exact version is:
Hibernate Tools 3.3.0.v20101206-2100-H28-Beta2 org.hibernate.eclipse.feature.feature.group


Top
 Profile  
 
 Post subject: Re: v3.3.0 - hbm to POJO requires POJO's?
PostPosted: Fri Jan 14, 2011 1:08 pm 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
xerces8 wrote:
Am I overlooking something obvious?

Yes!

hbm2java is looking for information that is not in the hbm.xml file, like types of properties.

Putting type="java.lang.Long" and similar into the definition of the property fixes the need for the preexisting POJO.

Sorry for false alarm. ;)


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.