-->
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: <join> mapping with component and a restriction?
PostPosted: Fri Oct 23, 2009 2:53 pm 
Newbie

Joined: Sun Oct 22, 2006 11:28 am
Posts: 15
Hi All,

I'm using Hibernate 3.3.2.

I'm using the <join> tag to map a component into an entity as follows, where the component is joined from a different table:

Code:
<join table="password">
<key column="user_id" unique="true" not-null="true>
    <component class="com.opterus.opscenter.model.common.Password" name="currentPassword">
        <property name="password" type="string" column="password"/>
        <property name="active" column="active" type="integer"/>
        <property name="expireDate" type="integer" column="expire_date"/>
    </component>
</join>


This works fine, but is there any way to add a formula to the join where I can add, for instance, a part to the where clause like active=1? The component doesn't take a formula element, which is where I think it needs to be.

Any ideas?


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.