-->
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.  [ 2 posts ] 
Author Message
 Post subject: ManyToOne with @Formula mapping instead of @Joincolumn ?
PostPosted: Mon Feb 12, 2007 7:13 am 
Newbie

Joined: Fri Dec 01, 2006 10:01 am
Posts: 6
I was just wondering if this support is in hibernate annotations yet ?
I can't seem to find it ...

I have a working version with xml mapping files that contain this :

Code:
      <many-to-one name="opsmode"
         class="com.watchtalk.web.businessobject.OperationalMode"
         update="false" insert="false">
         <column name="OPSMODE" length="2" />
         <formula>'OPSMODE'</formula>
         <formula>'0'</formula>
      </many-to-one>

That works fine.

Now is there a way to get the same bahviour with annotations ?
Something like :

Code:
    @ManyToOne
    @JoinColumns (
        {
           @JoinColumn ( formula="SUBSTR(APPLMODID, 0, 2)", referencedColumnName = "TYPE" )
            ,@JoinColumn ( formula="SUBSTR(APPLMODID, 2, 4)", referencedColumnName = "NAME" )
            ,@JoinColumn ( name="message" , referencedColumnName = "messageid" )
        }
    )
    public Logmessage getMessage() {
        return message;
    }


Is this supported yet ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 15, 2007 6:41 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
no, unfortunately this is not supported yet. A contribution would be welcome though :-)

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.