问题
Is there possible way to create the table at runtime without using the native query.
Point : if native query is used, SQL query
may be depend on the DB server. Otherwise, is there possible way to create a table at runtime. I used EclipseLink 2.4.1
and Spring 3.1.1
.
回答1:
As per JPQL specification, there is no way to create new tables or entities.
JPQL is run on entities which would have been bound to schema already and so, it seems logical to be not able to create tables on the fly.
来源:https://stackoverflow.com/questions/20625953/jpql-create-table-at-runtime