-->
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.  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: H3 hbm2java - full constructor
PostPosted: Tue Mar 08, 2005 8:09 pm 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
Hibernate version: 3RC1

Hi,


I've generated sources 2 weeks ago with H2.1.7 and full constructor had super(x,y,z) inside.
Today I changed Hibernate version to 3RC1 and my full constructor doesn't contain super(x,y,z).

is it a bug or I just missed something in documentation (what?).

greetings,
Bimki[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 4:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there isnt yet a commandline hbm2java for H3.
(there will be, dont worry ,)

Have you tried with the hibernate tools which should include constructors ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 5:17 am 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
Quote:
Have you tried with the hibernate tools which should include constructors ?

Yes - I tried. Here is my target def :

Code:
   <target name="generatesources">
      <taskdef name="generatesources" classname="org.hibernate.tool.hbm2java.Hbm2JavaTask" classpathref="classpathHibernate"/>
      <generatesources config="${basedir}/src/hibernate.cfg.xml" output="${basedir}/src">
         <fileset dir="src">
            <include name="**/*.hbm.xml" />
         </fileset>
      </generatesources>
   </target>


and my constructor doesn't include superconstructor :(

Bimki


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 5:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sorry - i meant hibernate eclipse tools.

the cmdline/ant you are running is obsolete.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 6:39 am 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
Quote:
sorry - i meant hibernate eclipse tools.

ok - I changed generation method to eclipse-tools. Now I just have default constructor.

Previously I used hbm2java from hibernate-tools.jar from eclipse-tools lib directory and I had full-constructor (but without supercostructor)

Bimki


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 9:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ok seems i have to revisit the constructor generation......

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 10:02 am 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
ok,

please, reply this post, when some patch'll be avaliable :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 10:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
create a jira issue for it if you want to be notified about any kinda patch ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Argument order changed, too
PostPosted: Fri Mar 11, 2005 8:04 am 
Beginner
Beginner

Joined: Sat Feb 26, 2005 12:09 pm
Posts: 27
Location: Helsinki, Finland
The problem that I have with full constructors is it that the argument order has changed compared to the 2.x version of hbm2java. The calls to the constructors from my code are now broken.

Should I expect the old order to be restored in a new build of the tools or should I start changing my code?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 9:11 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm....i havent done anything explicitly for changing the orders as its purely controlled by the sequence in the mapping.

i havent done it for the new toolset yet, but it will basically do the same - but now by the order provided via the hibernate meta model.

I cant gaurantee a specific order - sorry.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 10:43 am 
Beginner
Beginner

Joined: Sat Feb 26, 2005 12:09 pm
Posts: 27
Location: Helsinki, Finland
max wrote:
hmm....i havent done anything explicitly for changing the orders as its purely controlled by the sequence in the mapping.

I did not change the mapping file.

I guess I have to use the setters and stay away from the full constructors. :-(


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 24, 2005 11:03 pm 
Newbie

Joined: Wed Jun 29, 2005 6:09 pm
Posts: 3
[A folllow-up question]
Do you know when full constructors will be supported in Hibernate 3.0?

If not, is there an option that we can pass while we define the property in the mapping file that will force the property to be a part of the constructor?

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 25, 2005 3:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the best way to get it is to provide a patch and attach it to http://opensource.atlassian.com/project ... se/HBX-317

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Unable to get mapping files for Hibernate3
PostPosted: Thu Jul 28, 2005 8:55 am 
Newbie

Joined: Thu Jul 28, 2005 8:27 am
Posts: 7
Hi,
Im just migrating from hibernate2 to hibernate3 and trying to use middlegen for generating Java Beans and Hibernate mapping files against hibernate-3.
Although i've put all the libraries that come packed with hibernate-3, hibernate-tools-3.0.0.alpha4a (from eclipse plugin) and xdoclet-lib-1.2.3 in middlegen library. I still get the generated mapping files with DTD of hibernate2.
Rest assured that i've made changes in build.xml accordingly.
Waiting for a reply.
Kind regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 8:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I have patchup Middlegen to generate the HIbernate 3 DTD reference. Get the lastest from CVS.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 20 posts ]  Go to page 1, 2  Next

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.