1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Referential Integrity

Referential Integrity

4 posts, 1 answered
  1. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    14 Jun 2011
    Link to this post
    Hi,

    I developed a custom membership provider who can create users under conditions. And during my tests, I encounter a referential integrity problem on the database.

    On datatable [sf_user_link] there is no constraints. By code with standard method's provider, I can successfully link role to non existing user...

    Regards,
    Nicolas
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    16 Jun 2011
    Link to this post
    Hi Nicolas,

    Indeed there are no constraints in the database. We maintain the integrity inside our code. Does the lack of such constraints interfere with the logic in your custom provider?

    Greetings,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    16 Jun 2011
    Link to this post
    Not really but it can be dangerous and totally invisible when we realize custom's development on Sitefinity.
    I see it because my membership provider doesn't save the generated user in database, and link it to role in [sf_user_link].

    For each development who generate sitefinity items it potentially corrupt data in our database. And we have to be sure code source works perfectly before use manager method SaveChanges().

    Regards,
    Nicolas
  4. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    17 Jun 2011
    Link to this post
    Hi Nicolas,

    Usually we handle this by using transactions - this ensures the data integrity and prevents orphan records from occurring. None of the tables in our model have any restraints, everything is handled via transactions.

    All the best,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
4 posts, 1 answered