Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> IEntityFIeld2 versus IEntityField
 

Pages: 1
Bugs & Issues
IEntityFIeld2 versus IEntityField
Page:1/1 

  Print all messages in this thread  
Poster Message
Puromtec
User



Location:
MD
Joined on:
22-Jun-2005 16:38:52
Posted:
48 posts
# Posted on: 16-Jan-2008 22:23:12.  
LLBLGen Pro version:
1.0.2004.2 Final
Released:
may 17th, 2005

.net 2.0

++++++++++++++++
Code:

public static EntityCollection GetUsersNotInRole(int appId, int roleId)
        {
            DataAccessAdapter adapter = new DataAccessAdapter();

            EntityCollection coll = new EntityCollection(new UserEntityFactory());

            RelationPredicateBucket bucket = new RelationPredicateBucket();

            //add conditions
            bucket.PredicateExpression.Add(PredicateFactory.CompareValue(
                UserFieldIndex.ApplicationId, ComparisonOperator.Equal, appId));

            bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
                EntityFieldFactory.Create(UserFieldIndex.UserId), null,
                EntityFieldFactory.Create(UserRoleFieldIndex.UserId),
                SetOperator.In, null));
            
            
            adapter.FetchEntityCollection(coll, bucket);

            coll.SupportsSorting = true;

            return coll;


        }


has compile error on this part:
Code:
bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
                EntityFieldFactory.Create(UserFieldIndex.UserId), null,
                EntityFieldFactory.Create(UserRoleFieldIndex.UserId),
                SetOperator.In, null));


that says a few things like this:
Quote:
Argument '1': cannot convert from 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'


Attached is images of visual studio showing error. The documentation says that this is the proper call to adding a predicate to a bucket. Please assist.

Thanks.
  Top
Puromtec
User



Location:
MD
Joined on:
22-Jun-2005 16:38:52
Posted:
48 posts
# Posted on: 16-Jan-2008 23:01:16.  
Ok, the vast number of parameters and overloads have blurred my vision. The following version compliles now:

Code:
bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
                EntityFieldFactory.Create(UserFieldIndex.UserId), null,
                EntityFieldFactory.Create(UserRoleFieldIndex.UserId),null,
                SetOperator.In, null, true));


Issue resolved.


  Top
Pages: 1  


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

Version: 2.1.12172008 Final.