Thanks for your response. You are right - it is skipping duplicates (as defined by the 
identifier). Here is the
Mapping for your reference. I will try to change the mapping to include a unique key 
and then give it a shot. This part  is kind of weired though, since I am now forced to 
use one of the columns that exist in the table although the query may not have a 
one-to-one relationship with the table.

Thanks for your help anyway.

Sunit


<class name="com.amazon.invhealth.disposition.dataentities.CandidateSummary" 
identity="asin">
        <!--
        ASIN                                               CHAR(10)
        WAREHOUSE_ID                                       CHAR(4)
        REMOVAL_REASON_CODE                                VARCHAR2(2)
        INVENTORY_ITEM_IDENTITY                            VARCHAR2(255)
        QUANTITY                                           NUMBER(8)
        ORIGINAL_BIN_ITEM_QUANTITY                         NUMBER(8)
        -->
        <map-to table="removal_candidates"/>
        <field type="string" name="asin">
            <sql name="asin" dirty="ignore" type="char"/>
        </field>
        <field type="integer" name="inventoryOwnerGroupId">
            <sql name="inventory_owner_group_id" dirty="ignore" type="integer"/>
        </field>
        <field type="string" name="warehouseId">
            <sql name="warehouse_id" dirty="ignore" type="char"/>
        </field>
        <field type="string" name="fcsku">
            <sql name="fcsku" dirty="ignore" type="char"/>
        </field>
        <field type="integer" name="sumQuantity">
            <sql name="sum_quantity" dirty="ignore" type="integer"/>
        </field>
        <field type="integer" name="maxCondition">
            <sql name="max_condition" dirty="ignore" type="integer"/>
        </field>
</class> 

-----Original Message-----
From: Martin Fuchs [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 11, 2004 12:01 PM
To: Kavathekar, Sunit; [EMAIL PROTECTED]
Subject: Re: Strange error with SQL execution

Hello Sunit,

> Anyone have any experience with this before ? I'm working with an 
> Oracle database. When using Castor to execute a query I get a certain set of rows.
> Executing the exact same query with sqlplus yields more rows. The 
> castor query always skips a certain set of rows. I've tried it many 
> different ways changing the order by and the group by and running it 
> in ReadOnly and Shared mode. Castor always skips the exact same set of 
> rows every single time and sqlplus does not. The rows exist and do 
> satisfy the condition in te where clause.

Could you please post the related part of your mapping file?
In particular, what PK definition do you use?
Could it be, the skipped lines are just that with identical PK values compared to 
there predecessors? In that case you should define another, unique PK column to get 
all your data as result set.

Regards,

    Martin

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to