locked
Lightswitch - error message when updating a datasource RRS feed

  • Question

  • Hello,

    since yesterday i'm geetting this strange error message:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Id 'LightSwitchCommonModule:ChargingTransaction/Properties[ChargingTransaction2]' is already assigned to another editable model item.

    ---------------------------
    OK  
    ---------------------------

    Any ideas?

    Tuesday, October 22, 2013 7:14 AM

Answers

  • Hello,

    thank you so much for your support. By just asking this question of providing the model I found the solution.

    I tried to extract the relevant parts of the data model into a different DB so I could send it to you. On the way of doing it found that there is a foreign key that I did not expect to be there. It is a actually a foreign key from ChargingTransactions.ChargingTransactionsID (primary key) to ChargingTransactions.ChargingTransactionsID, so a foreign key that points to the same table. Stange enought SQL Server allows you to create this

    I deleted the FK. The error is gone.

    Solved.

    Up the Irons (if you know what that means)

    Hansjörg

    Germany

    P.S. you should start to update to xbox-one :-)

    • Marked as answer by Angie Xu Wednesday, October 30, 2013 2:35 AM
    Tuesday, October 22, 2013 9:10 AM

All replies

  • You have encountered a naming conflict. LightSwitch tries to assign unique names by appending a number but there are a few instances where it does not work.

    Could you try attaching the datasource to a new empty project. If that fails try to narrow it down, perhaps just the entity 'ChargingTransaction'. When the likely cause of the name conflict is identified it may be possible to rename a column in the external datasource to make it work.

    Cheers

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Tuesday, October 22, 2013 8:50 AM
  • Hello,

    thank you so much for your support. By just asking this question of providing the model I found the solution.

    I tried to extract the relevant parts of the data model into a different DB so I could send it to you. On the way of doing it found that there is a foreign key that I did not expect to be there. It is a actually a foreign key from ChargingTransactions.ChargingTransactionsID (primary key) to ChargingTransactions.ChargingTransactionsID, so a foreign key that points to the same table. Stange enought SQL Server allows you to create this

    I deleted the FK. The error is gone.

    Solved.

    Up the Irons (if you know what that means)

    Hansjörg

    Germany

    P.S. you should start to update to xbox-one :-)

    • Marked as answer by Angie Xu Wednesday, October 30, 2013 2:35 AM
    Tuesday, October 22, 2013 9:10 AM
  • I have now heard of RockSmith ;)

    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Tuesday, October 22, 2013 9:20 AM
  • I just had the same issue and found that a FK was referencing the same PK column in the same table. After I deleted it the error went away. Thanks for pointing me in the right direction.
    Thursday, May 29, 2014 3:55 AM