-->
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.  [ 3 posts ] 
Author Message
 Post subject: Table per subclass - annotation in javadoc
PostPosted: Mon Jan 30, 2012 11:28 am 
Newbie

Joined: Mon Jan 30, 2012 9:09 am
Posts: 5
Hi, all probably this already exist somewhere (I tried to find, but I did not succeed).

We have to use Hibernate 3.6.x
We use annotations in java files before methods and classes in javadoc.

Like this:

/**
* @hibernate.mapping
* default-lazy="false"
* @hibernate.class
* table="CLASS"
* lazy="false"
*/

public class Class implements IClass {

private long classId;
/* Artificial property used as primary key */
/**
* @hibernate.id
* generator-class="sequence"
* type="long"
* unsaved-value="0"
* column="CLASS_ID"
* @hibernate.generator-param
* name="sequence"
* value="s_class"
*/

public long getTechKey(){
return classId;
} }

I need this type of annotations for inheritance, strategy table per subclass.

Thank you a lot for help.

P.S.
I:E: class B1 and B2, they extend from A
class A {
atribute a1, a2;
}

class B1 extends A {
atribute b11;
}

class B2 extends A {
atribute b21;
atribute b22;
}

I do not know is this is correct forum section but I hope it is.


Top
 Profile  
 
 Post subject: Re: Table per subclass - annotation in javadoc
PostPosted: Mon Jan 30, 2012 11:58 am 
Newbie

Joined: Mon Jan 30, 2012 9:09 am
Posts: 5
As this forum is not very efficient, I search harder and discover that this are XDoclet annotations http://xdoclet.sourceforge.net/xdoclet/tags/hibernate-tags.html.

Anyway if someone is familiar with XDoclet annotations can post reply as well.


Top
 Profile  
 
 Post subject: Re: Table per subclass - annotation in javadoc
PostPosted: Mon Jan 30, 2012 12:17 pm 
Newbie

Joined: Mon Jan 30, 2012 9:09 am
Posts: 5
There is a good example in this file.

http://downside.ch/hibernate/hibernatetutorial-1.4.pdf


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