table « Annotation « JPA Q&A





1. introspection - table name of an object managed by Hibernate (JavassistLazyInitializer)    stackoverflow.com

I want to get through introspection the table name of an object managed by Hibernate (in lazy). my object contains "org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer" in the property handler. my object is of type "mypackage.myObjectDO_ _javassist_2 $ ...

2. Hibernate Annotation (Pyramid Structure - same table)    stackoverflow.com


I have a person table that contains the following fields: id, name, parent_id. the parent_id is actually a FK for column id. the data should look like this (Like a pyramid):

"id"  ...

3. Table annotation in jpa with portion of the table name dynamically    stackoverflow.com

in JPA annotation @Table(x+"_Name"), I want the x to be fed by spring config file. Is it possible in JPA? actually all our db tables name have prefix with application name, and ...

4. @org.hibernate.annotations.Table references an unknown table    forum.hibernate.org

Newbie Joined: Fri Nov 06, 2009 10:26 am Posts: 2 We are attempting to setup a multi-column index. This is how our code looked before setting up index. Everything works fine and we have used it for months. @javax.persistence.Entity @javax.persistence.Table(name="PERSONNEL_VERSION") public class PPersonnelVersion extends PVersion { ************************************************** This is code trying to create the index. It fails with the exception in ...

5. annotation org.hibernate.annotations.Table is missing applie    forum.hibernate.org

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

6. Problem with indices and @Table-Annotations    forum.hibernate.org

Hi, i'm trying to set additional indices on a MySQL-databasetable. This is the relevant part of the code: Code: @Entity @javax.persistence.Table(name = "tb_myTable") @org.hibernate.annotations.Table(appliesTo = "tb_myTable", fetch=FetchMode.JOIN, indexes={ @Index(name="my_idx", columnNames={"field","another"}) } ) public class MyClass { private double field; private double another; .... @Column ...