Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Rombouts 71 posts 265 karma points
    Oct 16, 2013 @ 16:29
    Peter Rombouts
    0

    Error when changing First name property alias or Last name property alias

    By default, the First name and Last name property aliases in the 'Order' tab in TeaCommerce are set to 'firstName' and 'lastName'.

    For convention reasons, we have changed these to 'firstname' and 'lastname'

    After this update, we get the following error when changing the orderstatus:

    Violation of PRIMARY KEY constraint 'PK_TeaCommerce_CustomProperty'. Cannot insert duplicate key in object 'dbo.TeaCommerce_CustomOrderProperty'. The duplicate key value is (cea06e67-6e78-4730-a1a1-7818af119b5a, lastName)

    Please note that we have changed all settings in our code/js etc.

    We have even changed the aliases in the database to check if that resolves the issue, but unfortunately this did not help.

    We have changed everything back to the camelcase variant, but we still would like some feedback on this issue.

    Kind regards,
    Peter Rombouts

  • Anders Burla Johansen 2560 posts 8256 karma points
    Oct 17, 2013 @ 09:22
    Anders Burla Johansen
    0

    Hi Peter

    The reason is that the OrderId and the Alias of the property is the DB key - so no keys can have the same alias. If you use MS SQL - then the key might not be case sensitive and that is why this would fail. If you change the settings for the store - you properly also have to change all the ones that are already in the DB.

    Hope this helps a bit. Else write me a bit more of details of how to reproduce :)

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft