New Posts New Posts RSS Feed: Filtering children rows
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Filtering children rows

 Post Reply Post Reply
Author
eileenv View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Jun-2007
Location: United States
Posts: 68
Post Options Post Options   Quote eileenv Quote  Post ReplyReply Direct Link To This Post Topic: Filtering children rows
    Posted: 18-Oct-2007 at 5:14pm

There are some drawbacks to using the SqlWhere clause for filtering:

·         DevForce does not validate “Sql Where” clause text; if it is not valid for the runtime database, DevForce will pass the database exception back to the caller.
 
·         The clause applies only for database OQL queries when they resolve into SQL queries applied to the database table. The clause is ignored when the OQL generates a query against the entity cache and it plays no role in any other kind of entity query such as a PassThru SQL or Stored Procedure Query.
 
·         The clause can only be used to differentiate immutable objects. In other words, if a change occurs such that an OrderDetail should belong to this filtered list, the OrderDetail will not become part of the list immediately; first you must save it, remove it from the cache, then re-fetch the OrderDetail object.
 
To filter instances dynamically, you might consider using an EntityListManager as described in the following tech tip:
 
 


Edited by eileenv - 18-Oct-2007 at 6:28pm
Back to Top
lars-erik View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Oct-2007
Location: Norway
Posts: 19
Post Options Post Options   Quote lars-erik Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:34pm

I have Order and Orderdetail in a one-to-many relation.

I want to filter the Orderdetail meeting a special criteria.
Is this possible? (without making my own entityList of Orderdetail)
E.g. Is it possible to have parameters in the SqlWhere in the entity of Orderdetail?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down