AccountEntity has a property 'Fields' with an unsupported type.

Posts   
 
    
ABOH
User
Posts: 148
Joined: 06-Sep-2011
# Posted on: 20-Oct-2011 05:43:44   

Hello,

I've created a RIA class library that contains an LLBLGEN DAL. I created a simple AccountsDomainService. To verify that it works properly, I created a Silverlight application as part of the solution and performed a GetAccounts() query. It works great! I unloaded the test application from the solution and built a release version of the class library.

Now that I know that it works... I went to our real production Silverlight application and added a reference from its .Web project to the Accounts.Web DLL. Next, I added a reference in our real Silverlight application client project to the Account's client DLL. I compiled the solution and I am getting the following compilation error:

"Entity 'ABitOfHelp.Accounts.DAL.EntityClasses.AccountEntity' has a property 'Fields' with an unsupported type."

I don't understand why the Accounts DLL would work in its own solution, but generate this error when used as a DLL. When I comment out the GetAccounts() query in the AccountsDomainService, the compilation error disappears.

I would really appreciate any ideas that you may have to offer...

Here is the simple query in the AccountsDomainService: namespace ABitOfHelp.Accounts { // TODO: Create methods containing your application logic. [EnableClientAccess()] [RequiresAuthentication] public class AccountsDomainService : LLBLGenProDomainService2 {

    protected override SD.LLBLGen.Pro.ORMSupportClasses.IDataAccessAdapter CreateDataAccessAdapter()
    {
        return new DataAccessAdapter();
    }

    [Query]
    public IQueryable<AccountEntity> GetAccounts()
    {
        IQueryable<AccountEntity> accounts = null;

        var adapter = new DataAccessAdapter();
        LinqMetaData linq = new LinqMetaData(adapter);

        accounts = (from a in linq.Account
                    select a);

        return accounts;
    }
}

}

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Oct-2011 10:11:53   

Please make sure you have referenced the following: The generated code projects The SD.LLBLGen.Pro.ORMSupportClasses dll The SD.LLBLGen.Pro.LinqSupportClasses dll The SD.LLBLGen.Pro.RiaSupportClasses dll

ABOH
User
Posts: 148
Joined: 06-Sep-2011
# Posted on: 21-Oct-2011 01:25:00   

Hi Walaa,

It appears that the items that you've suggested are in place in our projects. I've attached two images that show the references (client, Web) in our Silverlight application that is consuming the RIA class library that contains the LLBLGen DAL. Could you please take a look and see if you detect any issues that would cause the error message we are getting?

Thank you for your time and help,

Mike

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 21-Oct-2011 07:35:20   

Hi Mike. There are no images attached. In general, be sure you follow these instructions.

David Elizondo | LLBLGen Support Team
ABOH
User
Posts: 148
Joined: 06-Sep-2011
# Posted on: 22-Oct-2011 06:35:31   

Hi Daelmo,

Yeah, I re-reviewed the information that you mentioned, and am doing everything properly...

So...

I decided to simplify... I created a basic Silverlight solution and referenced the Accounts RIA DLL. The project detected the data sources, I dragged them onto a Page()... Presto! I saw data and did not have the error that we are getting in our real application.

So...

The good news is that the RIA library is working properly... The bad news is that I have to figure out why it isn't happy in our application! If the culprit is something that will help others, I will post the solution here.

Thanks for the help,

Mike