-->
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.  [ 4 posts ] 
Author Message
 Post subject: Too many parameters in generated constructors
PostPosted: Wed Sep 19, 2007 8:40 am 
Newbie

Joined: Wed Sep 19, 2007 8:16 am
Posts: 2
[b]Hibernate version: 3.2.5/Hibernate Tools 3.2.0beta9a[/b]

Hi,

I am working on a legacy database with large and quite confusingly interrelated tables.

With the Hibernate Tools (hbm2hbmxml and hbm2java) I want to generate the persistence classes from the DB's DDL. The mapping files are generated correctly but the resulting POJOs cannot be compiled as the constructors have to many parameters (> 255) due to the number of fields and associations.

I thought I would not be the first one facing this problem but I could not find any topic similar to this one.

Thanks in advance.

Ciccio


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 4:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
damn - that's a lot of columns...sure you want them all ? :)

only way i know around that at the moment is to remove the constructor generation from the pojo/*.ftl files.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 01, 2007 3:23 pm 
Newbie

Joined: Wed Sep 19, 2007 8:16 am
Posts: 2
Hi Max,

thanks a lot for the answer. It's more or less the same I was told by a friend of mine. However, I was not sure, if Hibernate used this constructor internally, too.

Cheers,
ciccio


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 01, 2007 3:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no - they are just there for your pleasure.hibernate does not need them.

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