a bit confused

Posts   
 
    
mafti
User
Posts: 38
Joined: 27-Oct-2004
# Posted on: 16-Dec-2004 08:56:37   

i'm not sure how to explain this, but i'll try simple_smile

i have 4 tables:

Foo fooID, ... Customer with customerID, fooID,... Worker with workerID, fooID,... CustomerWorker with CustomerWorkerID, customerID, workerID

Foo 1:n Customer Foo 1:n Worker Worker 1:n CustomerWorker Customer 1:n CustomerWorker

i want to have an editable grid for CustomerWorker, but i only know the fooID. so i have a fooID, get me all the CustomerWorker-records that basically have the same fooID

at first i thought, let's get me a typedview for CustomerWorker with fooID added. but then i cannot edit and update the CustomerWorker database

is this possible in an easy way?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 16-Dec-2004 09:46:57   

CustomerWorkerCollection customerWorkers = new CustomerWorkerCollection(); RelationCollection relations = new RelationCollection(); IPredicate filter = PredicateFactory.Create(WorkerFieldIndex.FooId, ComparisonOperator.Equal, myFooId); relations.Add(CustomerWorkerEntity.Relations.WorkerEntityUsingWorkerId); customerWorkers.GetMulti(filter, relations);

the section 'filtering and sorting' as well as the northwind demo apps have some of this code present and can help you finding the right code wink

Frans Bouma | Lead developer LLBLGen Pro