In @Table(name = "tableName") - make "tableName" a variable in JPA

Posted by zengr on Stack Overflow See other posts from Stack Overflow or by zengr
Published on 2010-03-15T03:42:28Z Indexed on 2010/03/15 3:59 UTC
Read the original article Hit count: 292

Filed under:
|
|

I am using JPA and I need to make the "tableName" a variable.

In a database, I have many tables, and my code needs to access the table where I specify it to read.

@Entity
@Table(name = "tableName")
public class Database implements Serializable {...............}

Any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about jpa