Change default polymorphism in Hibernate
Posted
by Sujee
on Stack Overflow
See other posts from Stack Overflow
or by Sujee
Published on 2010-06-08T09:35:51Z
Indexed on
2010/06/09
0:32 UTC
Read the original article
Hit count: 364
Hi,
I'd like to set polymorphism="explicit"
property to several hibernate mapping classes. is it possible to override the default implicit
value, so that I do not need to set explicit
in multiple classes?
<class name="xxxxx" table="XXXXX" polymorphism="explicit">
I am using hibernate mapping xml files (No annotations or JPA) and it was loaded by Spring as follows,
<bean id="xxxsessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="xxxDataSource"/>
</property>
<property name="mappingResources">
<list>
<value>xxx.hbm.xml</value>
--------
--------
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
----
----
</props>
</property>
</bean>
Thank you.
© Stack Overflow or respective owner