Conversion error from 2.5 to 3

Posts   
 
    
YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 21-Sep-2012 14:26:18   

Hi,

I'm using the converter template and receiving the following error : Compilation of templates threw errors: Error CS0117, at line: 970, pos: 38: 'SD.LLBLGen.Pro.ApplicationCore.ProjectProperties' does not contain a definition for 'SyncRenamedFieldElementsAfterRefresh' Error CS0117, at line: 1043, pos: 53: 'SD.LLBLGen.Pro.ApplicationCore.ProjectProperties' does not contain a definition for 'HideManyOneToOneRelatedEntityPropertiesFromDataBinding'

Stack : -----[Core exception]-------------------- at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Dictionary2 parameters) at SD.LLBLGen.Pro.ApplicationCore.Tasks.Task.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.Tasks.TaskGroup.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, Project projectDefinition, Language languageToUse, Platform platformToUse, List1 templateBindingsToUse, String templateGroupToUse, ApplicationConfiguration configurationSettings) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.StartGeneratorProcess()

My model in attachment.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 21-Sep-2012 14:34:53   

Is this the same thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=21347 ?

(no attachment present, btw)

Frans Bouma | Lead developer LLBLGen Pro
YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 21-Sep-2012 14:40:49   

Otis wrote:

Is this the same thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=21347 ?

(no attachment present, btw)

Yes sorry. Here it is.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 22-Sep-2012 07:09:57   

I reproduced your exception wit with 2.5 Final (June 2nd 2008 ). Please open your v2.5 project with the latest LLBLGen v2.6. This is noted in the documentation:

It's highly recommended to use the latest v2.6 designer build from the Customer area to convert the project, even though you're using v2.5 or earlier. The latest v2.6 designer build is free for all v2.x licensees.

I'm attaching the converted project from v2.6.

Attachments
Filename File size Added on Approval
ConvertedProjectV31Format_FromV26.zip 166,917 22-Sep-2012 07:11.37 Approved
David Elizondo | LLBLGen Support Team
YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 22-Sep-2012 21:28:27   

daelmo wrote:

I reproduced your exception wit with 2.5 Final (June 2nd 2008 ). Please open your v2.5 project with the latest LLBLGen v2.6. This is noted in the documentation:

It's highly recommended to use the latest v2.6 designer build from the Customer area to convert the project, even though you're using v2.5 or earlier. The latest v2.6 designer build is free for all v2.x licensees.

I'm attaching the converted project from v2.6.

Thanks. It works except for one project which converts with fails while opening. With attachment in 2 parts.

YvesVD
User
Posts: 177
Joined: 19-Oct-2006
# Posted on: 22-Sep-2012 21:37:38   

YvesVD wrote:

daelmo wrote:

I reproduced your exception wit with 2.5 Final (June 2nd 2008 ). Please open your v2.5 project with the latest LLBLGen v2.6. This is noted in the documentation:

It's highly recommended to use the latest v2.6 designer build from the Customer area to convert the project, even though you're using v2.5 or earlier. The latest v2.6 designer build is free for all v2.x licensees.

I'm attaching the converted project from v2.6.

Thanks. It works except for one project. With attachment in 2 parts.

Part 2

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 23-Sep-2012 11:39:18   

It works except for one project which converts with fails while opening.

This description is too vague. Which version gives the error, and what's the error?

Frans Bouma | Lead developer LLBLGen Pro
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 24-Sep-2012 01:48:03   

The exception when opening the converted project is this:

Exception message:

Exception type: XmlReadException Error occured when reading the following xml:'<Relationship Name="" StartAlias="TagHistJurVorm" EndAlias="TagRechPers" JoinHint="1" StartAliasIsStartVertex="false" />'.

Inner Exception message:

Value cannot be null. Parameter name: representedRelationshipEdge

The stack trace is attached. The problem is at your SearchPartij TypedList. Following the exception details it seems that some relation is not properly exported. Looking closely I see you have a FK field pointing to two different PK sides:

TagHistJurVorm.PartijId (m:1) TagPartij.Id TagHistJurVorm.PartijId (m:1) TagRechPers.PartijId

And TagRechPers is a subtype of TagPartij, so it seems very odd you came with those relationships. If I remove one of those relations and then remap the relation to be used in the TypedList, the converted project opens without problems. You have to analyze that. Also take into account these notes in the Migrating v2.x to v3.x docs:

Relationships are always specified as FK-PK. This is a convention to get rid of the duplicate relationships which are present in v2's projects (in v2.x, a m:1 relationship is also present as 1:n in the PK side), now the FK-PK relationship is stored both in the pk and the fk side.

Custom Relationships In v3 the concept of custom relationships has been changed into model only relationships. It can be the user has created multiple custom relations in v2, where the FK side has a custom relation to both A and B and both A and B are mapped onto the same table. These relations aren't filtered out but could lead to crashes or non compilable code. This edge case has to be corrected manually in the designer.

Relationship conversion All normal relationships which have their start entity as the FK side are emitted into the output, unless they're marked hidden, or used for hierarchies. If the relationship doesn't have an opposite, the relation is emitted, if the FK side is the start entity, otherwise the relation is ignored, as it's not a concept that's known in v3. Instead, in v2.x, the user should unhide the relation and hide the field mapped onto the relation. Custom relations which are present in just one side are seen as normal relations

So, please analyze the v2.6 project and fix those relations. Otherwise, remove the TypedList, perform the migration and then try to create the TypedList from the scratch in the converted project.

David Elizondo | LLBLGen Support Team