-->
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: @ManyToOne with @JoinColumnsOrFormulas
PostPosted: Thu Feb 18, 2010 3:33 pm 
Newbie

Joined: Thu Jan 29, 2009 8:49 pm
Posts: 5
Hello,

I am using Hibernate 3.5.0.cr1 and I thought I could use a formula to map a many to one class.

What I am trying to do is convert this mapping to an annotated decorator.


Code:
<hibernate-mapping package="com.netmemex.netmx.domain">
   <class name="MeetingAttendee" table="MX_MTG_ATTENDEE">
...
<many-to-one name="indOrg" class="com.netmemex.netmx.domain.lookup.IndOrg">
   <formula>
      (select mt.MT_MEMEX_INDORG from mx_member_type mt where mt.MT_CODE = MT_CODE)
   </formula>
</many-to-one>

<many-to-one name="memberType" column="MT_CODE" class="com.netmemex.netmx.domain.MemberType"/>
...
</class>
</hibernate-mapping>


I tried this

Code:
@ManyToOne
    @JoinColumnsOrFormulas( {
   @JoinColumnOrFormula(formula= @JoinFormula(value="(select mt.MT_MEMEX_INDORG from mx_member_type mt where mt.MT_CODE = MT_CODE)"))})   


but it gives me an error
Code:
ORA-01799: a column may not be outer-joined to a subquery


I would appreciate any help or point to a direction where I can go forward with

Thanks,

s.


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.