Joined: Tue Jun 08, 2004 8:07 pm Posts: 14 Location: Washington, D.C.
|
I am having some trouble switching over to MS SQL server with getting the tables created properly upon startup. It works with MySQL but blows up with SQLServer. Below are the details and I can certainly provide more detail if that'll help.
thanks
~harris
Hibernate version: 2.1.4
Mapping documents: <hibernate-mapping> <class name="electric.uddi.TModel" table="tmodels"> <id name="tModelKey" type="string" column="tmodel_key" access="field"> <generator class="assigned"/> </id> <property name="name" column="name" type="string"/> <property name="authorizedName" column="authorizedName" type="string"/> <property name="operator" column="operator" type="string"/> <property name="userName" column="userName" type="string"/> <property name="checked" column="checked" type="boolean"/> <property name="hidden" column="hidden" type="boolean"/> <property name="lastModified" column="lastModified" type="long"/> <many-to-one name="overview" class="electric.uddi.Overview" column="overview_key" cascade="none" /> <array name="descriptions" table="descriptions"> <key column="description_key" foreign-key="tmodel_key"/> <index column="description_index"/> <composite-element class="electric.uddi.Description"> <property name="text" column="text" type="string"/> <property name="language" column="language" type="string"/> </composite-element> </array> <array name="identifiers" table="identifiers"> <key column="identifier_key" foreign-key="tmodel_key"/> <index column="identifiers_index"/> <composite-element class="electric.uddi.Identifier"> <property name="name" column="name" type="string"/> <property name="value" column="value" type="string"/> <property access="field" name="tModelKey" column="tModelKey" type="string"/> </composite-element> </array> <array name="categories" table="categories"> <key column="category_key" foreign-key="tmodel_key"/> <index column="categories_index"/> <composite-element class="electric.uddi.Category"> <property name="name" column="name" type="string"/> <property name="value" column="value" type="string"/> <property access="field" name="tModelKey" column="tModelKey" type="string"/> </composite-element> </array> </class> </hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs: Oct 13, 2004 2:16:12 PM net.sf.hibernate.tool.hbm2ddl.SchemaExport execute SEVERE: Unsuccessful: alter table categories add constraint tmodel_key foreign k ey (category_key) references tmodels
Name and version of the database you are using: MS SQLServer 2000
|
|