Generated Code backward compatability

Posts   
 
    
PATHAYDEN
User
Posts: 5
Joined: 04-May-2011
# Posted on: 04-May-2011 18:44:51   

Existing code generated using 1.0.2005.1

New code generated using 2.6

The new code does not include PredicateFactory.vb, SortClauseFactory.vb

THe are NO validator classes in the generic project.

Without these items, the new generated code is useless as I must change too many things.

Am I missing something?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-May-2011 19:26:48   

Yup. Please read "migrating the code" and "Breaking changes" sections of v2.6 manual.

PATHAYDEN
User
Posts: 5
Joined: 04-May-2011
# Posted on: 04-May-2011 19:43:52   

What can I do to my original version to allow it to generate code against SQL Server 2008.

Honestly, we do not have time to redo everything to accomodate all the changes you require to use 2.6.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 04-May-2011 20:21:46   

In the preset, on tab 3 of the code generator configuration, you can enable the 2 tasks to generate these classes.

Keep in mind that in v3 they're removed. It's recommended to migrate away from these factories. You can re-use the templates in v3 if you want to move to v3 eventually, but they're no longer supported.

Frans Bouma | Lead developer LLBLGen Pro
PATHAYDEN
User
Posts: 5
Joined: 04-May-2011
# Posted on: 04-May-2011 21:39:11   

I did enable the generation of the 2 types of classes but still have over 300 errors in code.

Several of them refer to missing methods required to use IValidate... which I would think the product would generate the classes with the methods.

FetchEntity seems to be different also.

I must be able to put the generated code into my application without being forced to re-write too much code.

At one time we were told there was something we could do to 1.2005 to make it generate code against SQL 2008 without blowing up. From what I can gather, my problems start with the difference between the 1.2005 and the 2.6 ORMSupportcClasses.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-May-2011 06:38:31   

Yes, you should re-factor your code. I did that time ago (migration from v1.2005.x to v2.6). My best friend was VSNet find&replace with regular expressions. It took me some hours but I was able to migrate all the code. Is not that hard and it's worthy. You should read the migration section of the manual and start your migration.

David Elizondo | LLBLGen Support Team
PATHAYDEN
User
Posts: 5
Joined: 04-May-2011
# Posted on: 05-May-2011 14:02:47   

daelmo wrote:

Yes, you should re-factor your code. I did that time ago (migration from v1.2005.x to v2.6). My best friend was VSNet find&replace with regular expressions. It took me some hours but I was able to migrate all the code. Is not that hard and it's worthy. You should read the migration section of the manual and start your migration.

Well, I wish I had time to do all that........if I can't get this to work without massive "refactoring" I will start the process of removing the LLBL product.

I must say that I am slightly frustrated by the fact that the product is not backwards compatable.

Is there a quick solution to my problem? Is there something I can do behind the scenes to 1.2005 that will allow it to generate code against a SQL 2008 database without blowing up?

PATHAYDEN
User
Posts: 5
Joined: 04-May-2011
# Posted on: 05-May-2011 17:12:51   

OK ... i have made the changes and have my application compiling...

Lets see if I canget it all to work,

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 05-May-2011 17:39:38   

Let us know how you get on.

Matt