Multi-Collection Naming

8 posts, 2 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 07 Oct 2010 Link to this post

    It's EXTREMELY hard right now to figure out entity references when there's multiple references between two tables.  The appending of 1, 2, 3 etc to the end of the collection names is so generic.

    So, would it be possible to change the default naming of that collection item to have the property it's linked to instead?

    So lets use aspnet_users as an example...I create a new entity which has a link over to that for UserID.  So the generated property is what AspNetUser.  Ok then lets say that new table I just made also has a PARENT ID property which also links over to aspnet_users.  Well then when you create that reference it comes in as AspNetUser1.  Why couldnt it be AspNetUserParents and the other be AspNetUserUsers (option to auto-filter out the ID, or not even)...certainly more descriptive than AspNetUser1, AspNetUser2.

    When you do have to un-map then re-map (for whatever reason) it's a nightmare trying to figureout what the 1, 2, 3 map back to and what you had the property name set to.

    (also when it's a many relationship, why don't I get the property pluralized by default?)
  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 07 Oct 2010 Link to this post

    It would also be super handy if it would remember the property names if you remove a mapping so when you re-add they come back in as they were.
  3. DevCraft banner
  4. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 11 Oct 2010 Link to this post

    Hi Steve,

    In fact you are able to set custom names for these references:
    1. After adding new relationship you could select the generated property from the visual designer;
    2. Press F4 to open the Properties Window grid;
    3. Set the property’s name using the Name option;
    4. Save the diagram and rebuild the solution;

    I am afraid that after removing an association all the metadata about it is removed and there is no way to restore it at a later stage.
    Hope that helps.

    Best wishes,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 11 Oct 2010 Link to this post

    Well yes, you are right...and I do that :)

    But the problem is if you DON'T create the associations yourself (and lets say there's 3), how do you find out what which 1,2,& 3 reference when you map the entity back in.

    The issue isn't manually created links, it's the auto-generated ones.  Numeric field names are such a terrible way to do it because it means you will ALWAYS have to go back and rename them.  Whereas if they were based on their linked property then I might not ever need to rename them, AND I would know which they're referencing...
  6. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 13 Oct 2010 Link to this post

    Hello Steve,

    We will discuss your suggestion. Thank you for the valuable input.

    Kind regards,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 13 Oct 2010 Link to this post

    Thank you, I have my fingers crossed for this one....

    Along those lines though, is there a way to Assert that X Property\Collection exists for a unit test?  I want to make sure nobody on the team removes any functionality.

    I think this is a bit outdated (still using Scope)

    Steve
  8. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 14 Oct 2010 Link to this post

    Hello Steve,

    1. I prepared a sample application which demonstrates how to achieve that goal. You could extend the tests with more asserts.
    2. Yes, this help article is for the old API approach.
    Hope that helps.

    Kind regards,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 14 Oct 2010 Link to this post

    Awesome thanks!

    Please keep me posted on the Collection Naming issue too if you can :)

    *EDIT* FYI, that works fantastic, thanks
Back to Top
DevCraft banner