我在proxies = {
'http': 'myproxy.com:80',
'https': 'myproxy.com:80'
}
res = requests.post(MY_URI, headers = headers, data = json.dumps(payload), proxies=proxies)
中使用Hibernate
配置。我想要两个持久性单元。一个用于持久化或编辑数据库。第二个持久性uni`只能读取db。
Database-readonly 将只能对数据库执行“只读操作”。
persistence.xml
Database-Persist 将能够对数据库执行编辑(持久,修改或删除)
<persistence-unit name="Database-readonly">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<validation-mode>CALLBACK</validation-mode>
<properties>
.........
.........
<properties>
Hibernate配置中是否有任何属性可以让我实现这个?。
我想实现这一点,因为在阅读时不会对数据库启用事务性锁定,这意味着可以对<persistence-unit name="Database-Persist">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<validation-mode>CALLBACK</validation-mode>
<properties>
.........
.........
<properties>
启用多次读取。
问题: - Hibernate配置中是否有任何属性可以让我实现这个?。