I want to use the a sequence generator in an kundera-cassandra (V3.2) entity. Referring to this https://github.com/impetus-opensource/Kundera/issues/777 I have to set the CQL Version to Version 3 when creating the EntityManagerFactory
, and not when creating the EntityManager
. My Problem is that I use Spring and I do not know how to set the property when autowiring the EntityManagerFactory
.
@Id
@TableGenerator(name = "id_gen", allocationSize = 30, initialValue = 100)
@GeneratedValue(generator = "id_gen", strategy = GenerationType.TABLE)
private String id;
In my Repository i define the EntityManagerFactory
like this:
@PersistenceUnit
private EntityManagerFactory entityManagerFactory;
And in my application-context.xml I define the Bean like this:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="cassandra_pu" />
</bean>
<bean id="pum" class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
<property name="persistenceXmlLocations">
<list>
<value>classpath:persistence.xml</value>
</list>
</property>
</bean>
So can anybody tell my where to set the version-property?