有谁对hibernate精通的,问个问题
在使用hibernate的时候,设置了default_schema,这个在hql的执行的时候使用了,但是在执行sql的时候并没有使用,而是默认使用用户名作为schema,请问哪位高手知道怎么解决?
我的QQ676917392,欢迎指教
在使用hibernate的时候,设置了default_schema,这个在hql的执行的时候使用了,但是在执行sql的时候并没有使用,而是默认使用用户名作为schema,请问哪位高手知道怎么解决?
我的QQ676917392,欢迎指教
Properties p = configuration.getProperties();
p.put("hibernate.default_schema", Schema);
sessionFactory = configuration.buildSessionFactory(); 顺便看下你的配置文件
Properties p = configuration.getProperties();
p.put("hibernate.default_schema", Schema);
sessionFactory = configuration.buildSessionFactory(); 顺便看下你的配置文件
<property name="dataSource" ref="dataSource"/>
<property name="packagesToScan">
<list>
<value>com.demo</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="javax.persistence.validation.mode">none</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
这样hql是没有问题的,但是sql就不行了