-->
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: Multiplexer/Demultiplexer Mapping Pattern
PostPosted: Wed Feb 15, 2006 1:41 pm 
Newbie

Joined: Wed Feb 15, 2006 9:22 am
Posts: 7
Location: Florham Park, NJ
Hibernate version:3.0.2

I am trying to figure out how manage the mapping for this pattern. The general scenario is this:

|-------------| |--------------|
| Event |----------| Note |
|-------------| |--------------|

I have a one-to-one logical relationship between Event and Note. Note is basically a free form text field in the application of no specific constrained size.

However, because our database is indirectly replicated to a legacy platform, the instances of Note actually needs to be stored as n instances of text, 70 characters long, so the physical relationship is really a one-to-many.

I am trying to figure how I can "hide" the multiplexing of the text field out into instances of NoteFragment and maintain the facade of Event and Note.

I successfully achieved it through non-mapped pojo operations which simply do the Multiplexing/Demultiplexing behind the scenes, but then the excellent session.getSession(EntityMode.DOM4J) XML data streaming does not see the text field properly.

Can anyone recommend a mapping strategy for this ? I have started looking at UserType and its derivatives, but I am not sure if these will do the job.

Thanks.

//Nicholas


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.