JPQL在运行时创建表? [英] JPQL create table at runtime?

查看:107
本文介绍了JPQL在运行时创建表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在不使用本机查询的情况下在运行时创建表.

Is there possible way to create the table at runtime without using the native query.

要点::如果使用本机查询,则SQL query可能取决于数据库服务器.否则,有可能在运行时创建表的方法.我使用了EclipseLink 2.4.1Spring 3.1.1.

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.

推荐答案

按照 JPQL规范,无法创建新表或实体.

As per JPQL specification, there is no way to create new tables or entities.

JPQL在已经已经绑定到架构的实体上运行,因此,似乎无法动态创建表是合理的.

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.

这篇关于JPQL在运行时创建表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆