-->
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: annotation org.hibernate.annotations.Table is missing applie
PostPosted: Fri Dec 15, 2006 5:11 pm 
Newbie

Joined: Sun Mar 05, 2006 12:43 pm
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2.1 GA

Full stack trace of any exception that occurs:
compile-dao:
[echo] Compiling dao...
[javac] Compiling 2 source files to D:\workspace\stufftolet-cn\build\dao\classes
[javac] D:\workspace\stufftolet-cn\src\dao\com\stufftolet\model\City.java:22: cannot find symbol
[javac] symbol : method name()
[javac] location: @interface org.hibernate.annotations.Table
[javac] @Table(name = "city")
[javac] ^
[javac] D:\workspace\stufftolet-cn\src\dao\com\stufftolet\model\City.java:22: annotation org.hibernate.annotations.Table is missing appliesTo
[javac] @Table(name = "city")
[javac] ^
[javac] 2 errors



Name and version of the database you are using:MySql 5


Problems with Session and transaction handling? No

Read this: http://hibernate.org/42.html

Hi guys,

I am very new to hibernate annotation and my class is as follow:

/**
*
*
* @author <a href="mailto:markt@stufftolet.com">Mark Thien</a>
* Represents a Province
*
* @hibernate.query name="CitiesByProvinceCode"
* query="from City cy where cy.province.code = ? order by cy.code"
*
* @hibernate.query name="CitiesByCountryCode"
* query="from City cy where cy.province.country.code = ? order by cy.code"
*
*/
@Entity
@Table(name = "city")
public class City implements Serializable{

}

and when compiling, I got the error message as mentioned. Please help, Thanks !

Mark


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.