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