-->
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: Issue mapping legacy database
PostPosted: Mon Jun 19, 2006 5:54 am 
Newbie

Joined: Fri Oct 01, 2004 7:01 am
Posts: 3
Hello

I'm mapping a legacy database with hibernate 3.1. I have an issue with a convention on the legacy database mapping (witch is also OR mapped manually by a legacy application) and I can't find a good way make hibernate 'live' with it.

The problem is the the legacy ORM uses -1 to mark an non established many-to-one relationship.

I've allready patched hibernate to return null when it finds a -1 in a foreign key field. Is there any way I can do the oposite. i.e. make hibernate translate null to -1 in many-to-one associations when persisting the entity? (At first I've tried Interceptor but with no success as it's needed to pass over the typesfety of the setters)


Many thanks

Beowulf

Hibernate version:3.1


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.