这个表是按月生成的.基本上所有月度表的表结构都是相同的.
因为使用不同的表名映射同一个实体需要做很多工作,
是否可以在运行时更改实体的表名,因为它们毕竟具有相同的表结构?
@Entity
@Table(name="FOO_JAN2010") // any other ways to generate this dynamically?
public class FooJan2010Table { // if we can dynamically set the table name this can be simply named FooTable
...
}
Run Code Online (Sandbox Code Playgroud)
如果没有,你能提出什么方法?