-->
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.  [ 1 post ] 
Author Message
 Post subject: Special Mapping
PostPosted: Mon Mar 08, 2010 8:51 am 
Newbie

Joined: Sat Jun 09, 2007 12:29 pm
Posts: 19
Hi,

I looked at ManyToAny relationship mapping and I would need similar functionality, but slightly different.

My case:

Table of primary keys:

A {
id: long,
className: javaClassName
}

B {
id: A
...
}

Object B id column has the same id as A and reference is established on the database level.

We did a proof of concept on the MSSQL database - it is working. In this case the keys of a type A are descriptive (semantically) and I allways know what type a key is. If I have all the keys in a separate table I also can use this table as a registry, where I can allways found out what kind of object is behind some numeric key so I can have ManyToAny relationhips, but just with one field.

I've been struggling with Hibernate but I couldn't set all keys as they were supposed to be.

Hope I've been descriptive enough.

Any help appreciated.

Best regards,
Bojan

_________________
http://www.objectverse.com
http://www.alcyone.si
http://blog.alcyone.si


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.