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]