Groups
Groups
Sign in
Groups
Groups
oppna-program-dao-framework
Conversations
About
Send feedback
Help
Förändring av entitymanager default konfigurationen
1 view
Skip to first unread message
David Rosell
unread,
Dec 8, 2010, 8:46:56 AM
12/8/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to oppna-program-dao-framework
För hibernare kan man ange uppdaterings strategi av databasen genom
att skicka med en property i konfigurationen av entitymanagern:
hibernate.hbm2dll.auto
tillåtna värden är update, creat-drop, validate - jag tror validate är
default
Det vore trevligt att ha med detta som en konfigurationsparameter:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitManager" ref="pum" />
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter" ref="jpaVendor" />
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2dll.auto">${hibernate.hbm2dll.auto}</
prop>
<prop key="hibernate.show_sql">${hibernate.database.showsql}</
prop>
<prop key="hibernate.format_sql">${hibernate.database.showsql}
</prop>
</props>
</property>
</bean>
Reply all
Reply to author
Forward
0 new messages