-->
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.  [ 2 posts ] 
Author Message
 Post subject: SAXParseException: Attribute "column" must be decl
PostPosted: Tue Feb 15, 2005 12:17 pm 
Newbie

Joined: Tue Feb 15, 2005 12:10 pm
Posts: 4
I get the following error when attempting to create a one to many relationship between 2 classes
SAXParseException: Attribute "column" must be declared for element type "one-to-many".
I'm pretty new to Hibernate. I'm using hibernate 2.1. What am I doing wrong?

<hibernate-mapping>
<class name="com.aaa.bbb.dao.Query_Group" table="titan.Query_Group">
<id name="id" column="query_group_id" type="long">
<generator class="increment"/>
</id>
<property name="interval" />

<set name="Queries" table="titan.Report_Query">
<key column="query_group_id"/>
<one-to-many column="group_id" class="com.aaa.bbb.dao.ReportQuery"/>
</set>
</class>
</hibernate-mapping>


public class Query_Group {
private long id;
private String interval;
private Set queries = new HashSet();

public Set getQueries() {
return queries;
}

public void setQueries(Set sQueries) {
queries = sQueries;
}

public long getId() {
return id;
}

public void setId(long query_group_id) {
this.id = query_group_id;
}

public String getInterval() {
return interval;
}

public void setInterval(String interval) {
this.interval = interval;
}
}

public class ReportQuery {

private long id;
private long group_id;
private String name;
private String description;

public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public long getGroup_id() {
return group_id;
}

public void setGroup_id(long query_group_id) {
this.group_id = query_group_id;
}
}


Top
 Profile  
 
 Post subject: Nobody knows???
PostPosted: Thu Feb 17, 2005 11:53 am 
Newbie

Joined: Tue Feb 15, 2005 12:10 pm
Posts: 4
Nobody knows???


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