java - Why doesn't JPA/Spring creates sequences on Oracle DB -


i'm using jpa implement entity framework backed hibernate orm work oracle db.

everything glued (autowired) spring.

to generate db schema i've added jpa-context.xml

<bean id="h8jpavendoradapter" class="org.springframework.orm.jpa.vendor.hibernatejpavendoradapter">         <property name="showsql" value="false" />         <property name="generateddl" value="true" /> </bean> 

i've used sequence-generator generate ids entities reason when schema beeing created\updated, hibernate doesn't create sequences them selves.

this mapping.xml file injects identity field

<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"     version="1.0">      <mapped-superclass class="com.myapp.entity.basemodelentity" access="field">         <attributes>             <id name="id">                 <generated-value strategy="sequence" generator="model_seq"/>                 <sequence-generator name="model_seq" sequence-name="myapp_model_seq"/>             </id>         </attributes>     </mapped-superclass> </entity-mappings> 

searching google give me results of how use existing sequences, hibernate create them form me.

thanks in advance help


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -