在eclipse中显示生成SQL的toplink [英] Show generated SQL in toplink in eclipse
本文介绍了在eclipse中显示生成SQL的toplink的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下持久性.xml:
<?xml version =1.0encoding =UTF-8?>
< persistence version =1.0
xmlns =http://java.sun.com/xml/ns/persistencexmlns:xsi =http://www.w3.org/ 2001 / XMLSchema-instance
xsi:schemaLocation =http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd >
< persistence-unit name =myPUnittransaction-type =JTA>
< provider>
oracle.toplink.essentials.PersistenceProvider
< / provider>
< jta-data-source> jdbc / dcds< / jta-data-source>
<属性>
< property name =toplink.cache.shared.defaultvalue =false/>
< property name =toplink.logging.levelvalue =FINE/>
< / properties>
< / persistence-unit>
< / persistence>
我知道应该显示生成的sql语句,但情况并非如此。
解决方案
作为解决方法,在此处查找生成的SQL:
app_serv_home\j2ee\home\log\ oc4j\log.xml
请参阅:
http://m-hewedy.blogspot.com/2010/11/workaround-to-find-generated-sql-on-oas.html
I am using EclipseLink libraries in eclipse (at dev time) and deploy on TopLink, I need to show the generated sql statement.
I am using the following persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="myPUnit" transaction-type="JTA">
<provider>
oracle.toplink.essentials.PersistenceProvider
</provider>
<jta-data-source>jdbc/dcds</jta-data-source>
<properties>
<property name="toplink.cache.shared.default" value="false"/>
<property name="toplink.logging.level" value="FINE" />
</properties>
</persistence-unit>
</persistence>
I know it should show generated sql statements, but this is not the case.
解决方案
As a workaround, find generated SQLs here: app_serv_home\j2ee\home\log\oc4j\log.xml see: http://m-hewedy.blogspot.com/2010/11/workaround-to-find-generated-sql-on-oas.html
这篇关于在eclipse中显示生成SQL的toplink的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文