Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Hibernate and Intersystems Cache
PostPosted: Tue Aug 14, 2012 6:04 am 
Newbie

Joined: Tue Aug 14, 2012 5:29 am
Posts: 1
I'm taking a look at Hibernate to see how well it works with the Intersystems Cache database. The dialact org.hibernate.dialect.Cache71Dialect is bundled with Hibernate Core.

I got the following error when trying to load our tables. It was using the JBOSS tool in Eclipse.
reading Schema Error: Foreign Key name mapped to different tables.

I'm not sure if this is a problem with Hibernate, the JBOSS tool or the Intersystems dialect/driver. Can anyone help with this?

The crash only happens when Intersystems style 'relationships' are used between tables. Consider the example below.

Tables Customer, Order and Invoice. The tables Order and Invoice both have a column called Customer which is a foreign key to the Customer table. The issue appears to be related to two tables using the same name 'Customer' for foreign keys.

1) There is no problem when the tables are defined in a traditional manner using normal foreign keys. The same column name 'Customer' can be used in the Order and Invoice tables.
2) The error above will happen when Intersystems own style 'one-to-many Relationships' is used to link the Customer column to the Customer table. Both Order and Invoice then have a foreign key to the same table using the same name.
3) Other relationships appear to be ok so far. I've only had a problem when 2 tables link to the same 'parent' using the same column name.
4) The only solution I've found is to rename the columns and re-work the application accordingly.

As the problem is only related to relationships I'm not sure if Intersystems Cache is fully compatible.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

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.