-->
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.  [ 15 posts ] 
Author Message
 Post subject: Xdoclet and splitted subclass files
PostPosted: Fri Nov 05, 2004 7:09 am 
Newbie

Joined: Fri Nov 05, 2004 6:54 am
Posts: 8
Location: Munich
How is it possible to configure XDoclet to split a class and a subclass definition in two different mapping files?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2004 7:19 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
At the moment it is not possible.
Why do you need this? Is there use case for it?

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 07, 2004 12:49 pm 
Newbie

Joined: Fri Nov 05, 2004 6:54 am
Posts: 8
Location: Munich
I'd like to provide an entity base class with appropriate hibernate annotations inside a framework. Each concrete application entity should be a subclass of this class. The framework should be deployed as jar.
If I use the @hibernate.subclass tag inside a concrete entity, xdoclet would generate no mapping files for me.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 07, 2004 2:13 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
joejoe wrote:
I'd like to provide an entity base class with appropriate hibernate annotations inside a framework. Each concrete application entity should be a subclass of this class. The framework should be deployed as jar.
If I use the @hibernate.subclass tag inside a concrete entity, xdoclet would generate no mapping files for me.


Juat a question, you like to have polymorphic persistence this way? Shall different applications ( class implementation) share the same table?

Or you like to provide some basic functionality, and applications persisten classes do not know
eachs other and live in different tables?

In this case @hibernate.class on concrete entity shall be sufficient.

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 5:52 am 
Newbie

Joined: Fri Nov 05, 2004 6:54 am
Posts: 8
Location: Munich
I need different tables aka one for each entity and no polymorphic behaviour for all entities. But I'd like to provide a base class with an id and version property.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 6:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can just use a base-class, you can just add its properties to the mappings of the subclasses. There is no need to use <subclass> or even seperate mapping files.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 6:21 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
joejoe wrote:
I need different tables aka one for each entity and no polymorphic behaviour for all entities. But I'd like to provide a base class with an id and version property.


In this case forget about subclass. @hibernate.class would suffice.

And you can ( of course ) define common properties ( and of course
ID ) in base class - xdoclet will firn em there without problems.

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 6:42 am 
Newbie

Joined: Fri Nov 05, 2004 6:54 am
Posts: 8
Location: Munich
Thank you so much! This approach works nicely

P.S. coincidentally I've been in Wiesbaden last weekend :-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 7:06 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
joejoe wrote:
Thank you so much! This approach works nicely

P.S. coincidentally I've been in Wiesbaden last weekend :-)


Next time you can drop me a note , I'll try go get a leave from my girlfriend and you can spend me a beer :)

I know some nice places to drink it.

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 8:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Time to start some HUGs (Hibernate User Groups) :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 8:35 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
Can I have "Xdoclet Team" on my badge instead of "Hibernate Expret"? :) BItte bitte bitte...

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 8:37 am 
Newbie

Joined: Fri Nov 05, 2004 6:54 am
Posts: 8
Location: Munich
Good idea. I know a lot of people who consider to use hibernate or who are already using it. Especially when adopting hibernate in big applications there is actually no real platform for the exchange of experiences (eg. further design patterns than described in the hibernate website or in the book).
I gonna suggest a possible HUG at the next Java User Group Munich meeting.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 8:39 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Actually, there are still some ideas open after the last user poll we had. We are going to implement some new stuff soon (also move to a new server machine, the old one has serious load problems...). Not sure if the icons and names will be the same after this.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 9:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
joejoe wrote:
I gonna suggest a possible HUG at the next Java User Group Munich meeting.


Nice idea. If you send me a message (michael@hibernate.org) with the date and location, I would be happy to come by and chat about Hibernate and Java in general :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 08, 2004 9:30 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
For those in Rhein-Main I could propose some nice locations in wiesbaden - like

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 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.