-->
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: Sequence names and schemas
PostPosted: Fri Sep 12, 2003 8:59 am 
Beginner
Beginner

Joined: Tue Aug 26, 2003 1:02 pm
Posts: 34
Location: Akron, OH
Even though I've defined a default schema in my cfg.xml, it seems I still need to specify the schema name for sequences.
Code:
<hibernate-configuration>
  <session-factory name="hibernate.session-factory.Oracle">
    <!-- properties -->
    <property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
    <property name="connection.datasource">ObjectLibDS</property>
    <property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
    <property name="jndi.url">t3://127.0.0.1:7001</property>
    <property name="default_schema">eousr</property>
    <!-- mapping files -->
    <mapping jar="Oracle.hbm.jar"/>
  </session-factory>
</hibernate-configuration>

This works:
Code:
    <id name="id" type="java.lang.Long">
      <column name="TARIFF_ID"/>
      <generator class="sequence">
        <param name="sequence">eousr.tariff_seq</param>
      </generator>
    </id>

This doesn't:
Code:
    <id name="id" type="java.lang.Long">
      <column name="TARIFF_ID"/>
      <generator class="sequence">
        <param name="sequence">tariff_seq</param>
      </generator>
    </id>


Is this intentional? Do I have something misconfigured?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2003 10:18 am 
Beginner
Beginner

Joined: Tue Aug 26, 2003 1:02 pm
Posts: 34
Location: Akron, OH
Update:
It works correctly if I specify the schema in the mapping file in the <hibernate-mapping> or <class> elements.
This still seems like a bug. If I specify a defualt schema for a session factory, it should apply to all types of database objects, not just tables.


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.