-->
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.  [ 1 post ] 
Author Message
 Post subject: elt INTEGER not null
PostPosted: Wed Nov 02, 2005 10:49 am 
Newbie

Joined: Wed Nov 02, 2005 10:39 am
Posts: 1
Hi all,

I am looking for a solution for the following problem (found at http://sourceforge.net/mailarchive/foru ... nth=200402). Can anybody helb?


Thanx,
Thomas


--------- schnipp ---------------
I"m putting together an example demo for some students (like I"m the
expert :-\) and I"m using XDoclet, Tomcat, and MySQL for it all.
Person, abstract class extended by (joined-subclass) Teacher and
Student, with just an extra field in each, such as Course and Grade to
show the polymorphism.

I"d like to have a bidrectional many-to-many collection, a Teacher has a
set of Students, a Student has a set of teachers, basically I need a
teacher_student(teacherId, studentId) relation table. In the @hibernate
tags in Teacher.java:

/**
* Set the set of students
* @hibernate.set
* inverse="true" lazy="true" table="teacher_student"
* @hibernate.collection-many-to-many
* unique="false"
* class="csusb.Student"
* @hibernate.collection-key
* column="studentId"
*
* @return java.util.Set
*/
public void setStudents(Set students) {
this.students = students;
}

A similar thing is done in Student.java, except of course I turn around
the classes.
create table teacher_student (
studentId INTEGER not null,
elt INTEGER not null,
teacherId INTEGER not null,
primary key (teacherId, elt)
);
is generated by schemaexport. What is that ELT! How can I get rid of
it, what @hibernate tag or value am I missing?
------------------- schnapp -------------------------


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.