-->
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: ? on 2 hbm2java differences between v2.1.8 and v3.1.0beta4
PostPosted: Sat Feb 25, 2006 1:11 pm 
Newbie

Joined: Mon Jul 25, 2005 4:35 pm
Posts: 9
Hibernate Tools 3.1.0 beta4

When I use hibernatetool hbm2java to generate my java code, I have two differences from when I used hbm2java from hibernate 2.1.8.

I want to know if a) there is a way to get my desired behavior b) these are bugs or c) there is a reason this functionality no longer exists.

1) I have a component with a <parent name="o"/>, in hibernate 2 hbm2java would generate code with a parent node:

Hibernate 2.1.8 hbm2java generation
Code:
    /** nullable persistent field */
    private String s;

    /** nullable persistent field */
    private OwningNode o;

    /** full constructor */
    public Gen(String s, OwningNode o) {
        this.s= s;
        this.o= o;
    }


Hibernate 3.1.0 beta4 hbm2java generation
Code:
    // Fields   
     private String textString;

    // Constructors
    /** full constructor */
    public Gen(String s) {
        this.s= s;
    }


So the owning node is not part of the generated component.

2) In hibernate 2.1.8 if I had a property that was a formula, it was NOT part of the generated full constructor. However, in 3.1.0 beta4 the formula is part of the constructor.

Code:
<property name="count" type="long" formula="(select count(*) from TABLE">
inherit="false">private</meta>
</property>


Is there any way to stop these from being in the full constructor?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 25, 2006 1:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sounds like valid bugs to me! Report them in our jira

_________________
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.