migration from SelfServicing to Adapter

Posts   
 
    
Posts: 67
Joined: 10-Jun-2009
# Posted on: 08-Dec-2009 11:24:55   

for sereral reasons I have to migrate a project created with SelfServicing to an Adapter project. Main reason: the use of multiple databases on a per-user basis.

I've started to migrate the code, where I get a lot of compiler errors. Most of them are easy, but I can't figure out why the following error occures when creating a new FieldCompareSetPredicate: Argument '1': cannot convert from 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'.

Do I need to change a reference? Or should i change the parameters manually?

Posts: 67
Joined: 10-Jun-2009
# Posted on: 08-Dec-2009 12:23:08   

Same error occures when I try to create a SortClause: new SortClause(VConversationmatchFields.Count, SortOperator.Descending)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39863
Joined: 17-Aug-2003
# Posted on: 08-Dec-2009 18:20:34   

new SortClause(VConversationmatchFields.Count, SortOperator.Descending)

should be new SortClause(VConversationmatchFields.Count, null, SortOperator.Descending)

(as adapter uses different ctor, as it needs separate persistence info)

you can also do: VConversationmatchFields.Count | SortOperator.Descending;

which is preferable, so you don't need to mess with ctors.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 67
Joined: 10-Jun-2009
# Posted on: 09-Dec-2009 08:41:06   

Ok, thank you for your reply.

What should I change in the call to the FieldCompareSetPredicate constructor?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Dec-2009 10:16:54   

What should I change in the call to the FieldCompareSetPredicate constructor?

Please look it up in the LLBLGen Pro Reference Manual. There you can find the overloads for the Adapter model. Those which start with the IEntityFieldCore. Basicaly you will need to pass an extra null parameter after each entityfield2.

Posts: 67
Joined: 10-Jun-2009
# Posted on: 09-Dec-2009 12:18:50   

Clearly a RTM flushed flushed