Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Problem with FetchEntityCollection
 

Pages: 1
LLBLGen Pro Runtime Framework
Problem with FetchEntityCollection
Page:1/1 

  Print all messages in this thread  
Poster Message
Wade
User



Location:
Shelbyville, KY USA
Joined on:
15-Jun-2004 05:11:01
Posted:
76 posts
# Posted on: 10-Apr-2008 19:17:20.  
It is not a bug, but a problem we are having with the generated code in the Business Object Layer.

We want to Fetch an EntityCollection with a Filter and we do not want any of the relationships pre-fetched back.

Also, we are using the Adapter 2 class generation.

Basically if I am fetching Customers Collection with a filter on Name, but I do not want any of the orders or other related entities returned.


Please provide a code sample if you can.


Thanks,
Thanks,
Wade
 
Top
JimFoye
User



Location:
Austin, TX
Joined on:
22-Jun-2004 04:03:11
Posted:
656 posts
# Posted on: 11-Apr-2008 00:00:02.  
Code:

            EntityCollection<CustomerEntity> customers = new EntityCollection<CustomerEntity>();
            RelationPredicateBucket bucket = new RelationPredicateBucket();
            bucket.PredicateExpression.Add(CustomerFields.Name == "Smith");

            DataAccessAdapter adapter = new DataAccessAdapter();
            adapter.FetchEntityCollection(customers, bucket);


[Edit] had to correct the code.


  Top
Wade
User



Location:
Shelbyville, KY USA
Joined on:
15-Jun-2004 05:11:01
Posted:
76 posts
# Posted on: 11-Apr-2008 06:04:21.  
We tried this but we still get all the relationships fetched back at the same time. What we are wanting to do is create a grid based series of admin screens for look up table values. In the DB they have 1:M relationships where they are being used. We also want to use the power of the entity collection in the bound grid component. Any ideas here?

Thanks!
Thanks,
Wade
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14627 posts
# Posted on: 11-Apr-2008 11:00:59.  
Quote:
We tried this but we still get all the relationships fetched back at the same time

How come?
Are you sure you are using the Adapter model, not the SelfServicing one?

Would you please provide a code snippet of what you are trying and how you test for the existance of the related entities?


  Top
Wade
User



Location:
Shelbyville, KY USA
Joined on:
15-Jun-2004 05:11:01
Posted:
76 posts
# Posted on: 11-Apr-2008 15:48:04.  
Here is the code we are using and it is being bound to an infragistics grid that supports relationships automatically and we do not want the relationships showing up for this screen.

Code:

                sopcode = sopcode.Trim() + "%";

                PredicateExpression filters = new PredicateExpression();
                filters.Add(new FieldLikePredicate(OperationFields.OperationName, null, sopcode));
            
                            
                RelationPredicateBucket bucket = new RelationPredicateBucket(filters);
            

                using (DataAccessAdapter adapter = new DataAccessAdapter())
                {
                    adapter.FetchEntityCollection(operations, bucket);
                }




Please tell us what we are doing wrong.
Thanks,
Wade
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14627 posts
# Posted on: 11-Apr-2008 16:37:43.  
Quote:
Here is the code we are using and it is being bound to an infragistics grid that supports relationships automatically and we do not want the relationships showing up for this screen.

The mentioned code doesn't fetch the related entities and collections.
But the properties/fields mapped on these entities exist in the main entity object.

I think that's infragistic grid issue (to not display in ahierarchical mode).


  Top
Wade
User



Location:
Shelbyville, KY USA
Joined on:
15-Jun-2004 05:11:01
Posted:
76 posts
# Posted on: 11-Apr-2008 18:19:19.  
We finally figured it out to be a problem in the Infragistics XamDataGrid. There is a bit flag to turn off the Higherarchy drill-down. Plus, we confirmed the data is not being returned.

Thanks for all the help!
Thanks,
Wade
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.