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: hbm2ddl doesn't create hilo columns
PostPosted: Mon Nov 26, 2007 3:58 am 
Newbie

Joined: Fri Sep 01, 2006 8:45 am
Posts: 9
Hello.
I'm using NHibernate Version 1.2 an want to create the DB with hbm2dll.
Until now i've never a problem with that. But now I want to create the following tables and on each create only one column is created in table Ids. Can anyone help?

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   namespace="NH.Test"
                   assembly="Test">

  <class name="NH.Test.Customer" table="Customers">

    <id name="CustomerId" column="CustomerId" access="nosetter.camelcase-underscore" type="Int64">
      <generator class="hilo">
        <param name="table">Ids</param>
        <param name="column">NextCustomerId</param>
        <param name="max_lo">1000</param>
      </generator>
    </id>

    <bag name="Orders" cascade="delete">
      <key column="FKCustomerId" />
      <one-to-many class="Order" />
    </bag>
   
  </class>

</hibernate-mapping>

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   namespace="NH.Test"
                   assembly="Test">

  <class name="NH.Test.Order" table="Orders">

    <id name="OrderId" column="OrderId" access="nosetter.camelcase-underscore" type="Int64">
      <generator class="hilo">
        <param name="table">Ids</param>
        <param name="column">NextOrderId</param>
        <param name="max_lo">1000</param>
      </generator>
    </id>

  </class>

</hibernate-mapping>


Created DB Table Structure
Code:
CREATE TABLE [dbo].[Ids](
   [NextOrderId] [bigint] NULL)


Sincerely

kai


Top
 Profile  
 
 Post subject: Re: hbm2ddl doesn't create hilo columns
PostPosted: Mon Feb 11, 2008 10:28 am 
Newbie

Joined: Mon Feb 11, 2008 10:08 am
Posts: 1
This problem is also present in Hibernate http://forum.hibernate.org/viewtopic.php?t=982620


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.