[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Order of adding Join Attribute Expressions when using Dynamic Persistence

Can you post the exception?

 


----- Original Message -----
From: rohit.banga@xxxxxxxxxx
To: eclipselink-users@xxxxxxxxxxx
Sent: Saturday, December 18, 2010 6:27:18 AM GMT -05:00 US/Canada Eastern
Subject: [eclipselink-users] Order of adding Join Attribute Expressions when using Dynamic Persistence

Hello All

I have a customer table, a phone table and an order table.
The customer table has a one-to-many with both the phone and order tables.

I am querying the order table.

If I add the join attributes in the following sequence then it works fine:

        query.addJoinedAttribute(query.getExpressionBuilder().get("cust9.order9.custid"));
        query.addJoinedAttribute(query.getExpressionBuilder().get("cust9.order9.custid").anyOf("cust9.phone9.custid"););

However, if I add in this sequence I get an IndexOutOfBounds Exception.

        query.addJoinedAttribute(query.getExpressionBuilder().get("cust9.order9.custid").anyOf("cust9.phone9.custid"););
        query.addJoinedAttribute(query.getExpressionBuilder().get("cust9.order9.custid"));


Could you please! explain the reason for this exception? Is it expected that the join attributes be passed in a particular order?

Thanks in Advance.

--
Thanks and Regards
Rohit Banga
Member Technical Staff
Oracle Server Technologies