-->
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: Problem/Question with hbm2java and Custom Value Types
PostPosted: Fri Apr 07, 2006 7:41 pm 
Newbie

Joined: Fri Apr 07, 2006 7:23 pm
Posts: 9
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1.3

Hibernate-Tools version: 3.1.0beta4

I am basically having a problem that corresponds exactly to the symptoms of (closed and fixed) bug HBX-440. I have a Custom Value class called SeverityTypeMap that "wraps" a java enum I have called "Severity". When I run the generator under Eclipse it works fine and correctly generates fields and getter/setter methods that take a Severity object. When I run this using the hbm2java ant task, however, it generates code that incorrectly refers to the SeverityTypeMap class instead.

So what should look like:

Code:
class MyGeneratedClass
{
   private Severity status;

   public Severity getSeverity()
   {
      return this.status;
   }
   public void setStatus(Severity status)
   {
      this.status = status;
   }
}


It instead generates:

Code:
class MyGeneratedClass
{
   private SeverityTypeMap status;

   public SeverityTypeMap getSeverity()
   {
      return this.status;
   }
   public void setStatus(SeverityTypeMap status)
   {
      this.status = status;
   }
}


I (obviously) don't know how the internals work but I'm wondering if the problem has to do with my class path and the ability for hbm2java to know what a "SeverityTypeMap" class is (since it hasn't been compiled yet when the exporter runs). But I'm really just guessing...

Thanks in advance.[/code]


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.