-->
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.  [ 3 posts ] 
Author Message
 Post subject: Frustrated with different results
PostPosted: Tue Oct 14, 2003 12:11 pm 
Newbie

Joined: Fri Oct 03, 2003 11:58 am
Posts: 14
I have the following configuration:
Code:
<hibernate-mapping>
    <class name="com.contego.arx.domain.Host" table="hoststatus">
        <id name="hostname" type="java.lang.String" column="host_name">
            <generator class="assigned"/>
        </id>
        <property name="hostStatus" type="java.lang.String" column="host_status"/>
        <property name="lastUpdate" type="java.util.Date" column="last_update"/>
        <property name="lastCheck" type="java.util.Date" column="last_check"/>
        <property name="lastStateChange" type="java.util.Date" column="last_state_change"/>
        <property name="problemAcknowledged" type="java.lang.Boolean" column="problem_acknowledged"/>
        <property name="timeUp" type="java.lang.Long" column="time_up"/>
        <property name="timeDown" type="java.lang.Long" column="time_down"/>
        <property name="timeUnreachable" type="java.lang.Long" column="time_unreachable"/>
        <property name="lastNotification" type="java.util.Date" column="last_notification"/>
        <property name="currentNotification" type="java.lang.Integer" column="current_notification"/>
        <property name="notificationsEnabled" type="java.lang.Boolean" column="notifications_enabled"/>
        <property name="eventHandlerEnabled" type="java.lang.Boolean" column="event_handler_enabled"/>
        <property name="checksEnabled" type="java.lang.Boolean" column="checks_enabled"/>
        <property name="pluginOutput" type="java.lang.String" column="plugin_output"/>
        <property name="scheduledDowntimeDepth" type="java.lang.Integer" column="scheduled_downtime_depth"/>
        <property name="flapDetectionEnabled" type="java.lang.Boolean" column="flap_detection_enabled"/>
        <property name="isFlapping" type="java.lang.Boolean" column="is_flapping"/>
        <property name="percentStateChange" type="java.lang.Double" column="percent_state_change"/>
        <property name="failurePredictionEnabled" type="java.lang.Boolean" column="failure_prediction_enabled"/>
        <property name="processPerformanceData" type="java.lang.Boolean" column="process_performance_data"/>
        <set name="serviceStatuses" lazy="false">
            <key column="host_name"/>
            <one-to-many class="com.contego.arx.domain.Service"/>
        </set>

    </class>
</hibernate-mapping>


With this mapping the set whose name is "serviceStatuses" is not returning the correct information. One of the instances of Host has two instances of serviceStatuses but is only returning one.

I have crawled through Loader and OneToManyLoader and can't find the problem.

Apparently
Code:
OneToManyLoader.initizlize
is calling
Code:
Loader.loadCollection( SessionImplementer, Serializable, Type )
which in turn calls
Code:
Loader.loadCollection( SessionImplementor, Serializable[], Type[] )
then
Code:
Loader.doFind
.

Each of these methods appears to be performing correctly. However, as I mentioned, ultimately the collection is incorrect on the initial Host object.

Any help would be greatly appreciated.

Thanks!![/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 14, 2003 7:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
sounds like an equals/hasCode problem, but don't really know, since nowhere near enough information.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 15, 2003 9:57 am 
Newbie

Joined: Fri Oct 03, 2003 11:58 am
Posts: 14
I did not override either of those methods.

What additional information do you need?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.