-->
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: "where" attr in Class and Collection mapping
PostPosted: Wed Sep 21, 2005 2:05 pm 
Beginner
Beginner

Joined: Wed Oct 05, 2005 5:35 am
Posts: 47
Location: France
Hi, it looks like the optional "WHERE" attribute in Class mapping is ignored if this Class is used as a collection. In this case the "WHERE" attribute should be also added to the Collection mapping as well:

Code:
<map name="States" >
    <key column="CountryID" />
     <index column="Name" type="String"/>
     <one-to-many class="d001.State, d001" />
</map>

... would ignore any "where" attributes if present in State class mapping.
Code:
<map name="States" where="active=1">
    <key column="CountryID" />
     <index column="Name" type="String"/>
     <one-to-many class="d001.State, d001" />
</map>

... would work fine.
So some parts of the class mapping for State are ignored in this case? Is it a feature or a bug?


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.