Renamed field not changed after generate

Posts   
 
    
BR
User
Posts: 2
Joined: 08-Nov-2013
# Posted on: 08-Nov-2013 01:55:43   

Hi All, Sorry, I am an LLBLGen newb. We have just upgraded to VS2010 on Win 7 but an existing project uses 2.6 pro with no option to upgrade.

I have an existing entity called say "MyEntity" with a field name "MyFieldNK" that is currently mapped to a target called "MyFieldNk"

I have changed the field name to "MyField" and it remains mapped to a target called "MyFieldNk".

I performed a Generate, and got the following error: Access to the path 'C:\Build\MyProject\LLBLGen\DatabaseGeneric\HelperClasses\EntityCollection.cs' is denied.

I started VS2010 as an administrator and ran generate again, and it completed without error, but the updates to the entity are not flowing through. When I refer to a variable of type "MyEntity" I can still see the old name ""MyFieldNK" in intellisense.

Am I missing something? Any suggestions on how to change the name of a field on an entity? Cheers BR

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 08-Nov-2013 06:06:43   

It seems you have 2 different issues.

I performed a Generate, and got the following error: Access to the path 'C:\Build\MyProject\LLBLGen\DatabaseGeneric\HelperClasses\EntityCollection.cs' is denied

This is the first one. Do you have this file under source control? It seems to be locked for modification.

I started VS2010 as an administrator and ran generate again, and it completed without error, but the updates to the entity are not flowing through. When I refer to a variable of type "MyEntity" I can still see the old name ""MyFieldNK" in intellisense.

Regardeless of the intellisense, yoplease check the generated Entity class, to see whether the property name was changed or not.

BR
User
Posts: 2
Joined: 08-Nov-2013
# Posted on: 08-Nov-2013 06:12:15   

Thanks very much for your assistance Walaa,

I thought I had 2 issues aswell, but it turns out it was one issue and it was a silly mistake on my part.

During the upgrade to Win 7 I had to change my normal working folder from c:\MyFolder\MyProj to c:\user\MyLogin\MyFolder\MyProj.

I hadnt updated it in the Generate>Destination root folder.

Once I changed this, it worked.

Thanks again! simple_smile