-->
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: Is a choice of @IdClass or @EmbeddedId goint to be implement
PostPosted: Mon Mar 07, 2011 9:17 am 
Beginner
Beginner

Joined: Tue Dec 21, 2010 5:26 am
Posts: 25
I'm just asking this here, although I don't have high hopes for something like this, anymore ... It just seems like if Hibernate offers this choice - It should be in the Hibernate Tools (as an option for reverse engineering) aswell.

I read in a similar thread that the Hibernate Tools Team doesn't see any value to this. Seeing you can easily call:
pojo.getTableCompositeId().getIdFieldOne() or
pojo.getTableCompositeId().getIdFieldTwo()

But what if it is a requirement to have the pojos look exactly like their counterpart in the database? Exactly, then you have a bit of a problem, don't you?
At least if your tables/classes are running in the neiborhood of >300.

So, please reconsider making this available!


Top
 Profile  
 
 Post subject: Re: Is a choice of @IdClass or @EmbeddedId goint to be implement
PostPosted: Fri Mar 18, 2011 2:43 pm 
Newbie

Joined: Tue Feb 02, 2010 9:00 am
Posts: 19
I have exactly need such a requirement. Specifically I want to migrate current entity generations from Intellij IDEA to maven hibernate tools. And our legacy entities are generated with IDEA in this way.

I will be very glad to have ability to configure generating entities.

Thanks


Top
 Profile  
 
 Post subject: Re: Is a choice of @IdClass or @EmbeddedId goint to be implement
PostPosted: Fri Mar 18, 2011 6:52 pm 
Newbie

Joined: Tue Feb 02, 2010 9:00 am
Posts: 19
I have just checked source code of the code generation of the entities. At least now I am sure that there is not such a feature. Actually I could not feel myself brave enough to make a change.

Could you help us for such a feature?


Top
 Profile  
 
 Post subject: Re: Is a choice of @IdClass or @EmbeddedId goint to be implement
PostPosted: Sun Apr 10, 2011 3:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
X5-599 wrote:
I'm just asking this here, although I don't have high hopes for something like this, anymore ... It just seems like if Hibernate offers this choice - It should be in the Hibernate Tools (as an option for reverse engineering) aswell.

I read in a similar thread that the Hibernate Tools Team doesn't see any value to this. Seeing you can easily call:
pojo.getTableCompositeId().getIdFieldOne() or
pojo.getTableCompositeId().getIdFieldTwo()

But what if it is a requirement to have the pojos look exactly like their counterpart in the database? Exactly, then you have a bit of a problem, don't you?
At least if your tables/classes are running in the neiborhood of >300.

So, please reconsider making this available!


Just because the core allows to Map non clean models doesn't mean we should generate them.

If you have a requriement of exposing all properties flat on the model then you can implement that as addition to the template generation.

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