-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: SchemaExport does not generate sequences
PostPosted: Mon Aug 15, 2005 11:01 pm 
Newbie

Joined: Mon Aug 15, 2005 10:36 pm
Posts: 2
Hi,

I have a problem with the SchemaExport tool. It is not generating a sequence for the primary key. Can this be done with the tool or do I need to create the sequences in the database manually?

Thanks in advance for the help,

Snebla



Hibernate version: 3.05

Name and version of the database you are using: Oracle 9i

Mapping documents:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
  <class table="TEDCT_TSAC_TS_ACTIVATION" name="au.com.suncorp.easydoc.web.domain.hibernate.Activation">
    <id unsaved-value="null" name="id" type="java.lang.Integer" column="TSAC_ID" length="32">
      <generator class="sequence">
        <param name="sequence">TEDCT_TS_TEMPLATE_SET_SEQUENCE</param>
      </generator>
    </id>
    <many-to-one foreign-key="FK_TSAC_TSAC_TS_ID_01" class="au.com.suncorp.easydoc.web.domain.hibernate.TemplateSet" name="templateSet">
      <column name="TSAC_TS_ID" not-null="true"/>
    </many-to-one>
    <property name="activationDate">
      <column name="ACTIVATION_DTM" index="IXU_TSAC_01" not-null="true"/>
    </property>
    <many-to-one foreign-key="FK_TSAC_TSAC_APP_ID_02" class="au.com.suncorp.easydoc.web.domain.hibernate.Application" name="application">
      <column name="TSAC_APP_ID" index="IXU_TSAC_01" not-null="true"/>
    </many-to-one>
  </class>
</hibernate-mapping>


Generated Schema:
Code:
create table TEDCT_TSAC_TS_ACTIVATION (
   TSAC_ID number(10,0) not null,
   TSAC_TS_ID number(10,0),
   ACTIVATION_DTM timestamp not null,
   TSAC_APP_ID number(10,0) not null,
   primary key (TSAC_ID)
)
create index IXU_TSAC_01 on TEDCT_TSAC_TS_ACTIVATION (ACTIVATION_DTM, TSAC_APP_ID)
alter table TEDCT_TSAC_TS_ACTIVATION add constraint FK_TSAC_TSAC_TS_ID_01 foreign key (TSAC_TS_ID) references TEDCT_TS_TEMPLATE_SET
alter table TEDCT_TSAC_TS_ACTIVATION add constraint FK_TSAC_TSAC_APP_ID_02 foreign key (TSAC_APP_ID) references TEDCR_APP_APPLICATION


Top
 Profile  
 
 Post subject: User error
PostPosted: Mon Aug 15, 2005 11:16 pm 
Newbie

Joined: Mon Aug 15, 2005 10:36 pm
Posts: 2
Hi again,

It turned out that this was a user error :) I wasn't running the correct ant task and hence was not regenerating the schema.

Snebla


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.