This is a migrated thread and some comments may be shown as answers.

Multi-Collection Naming

7 Answers 57 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 07 Oct 2010, 08:24 PM
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?)

7 Answers, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 07 Oct 2010, 08:37 PM
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.
0
Damyan Bogoev
Telerik team
answered on 11 Oct 2010, 05:59 PM
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
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 11 Oct 2010, 06:03 PM
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...
0
Accepted
Damyan Bogoev
Telerik team
answered on 13 Oct 2010, 06:22 PM
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
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 13 Oct 2010, 06:36 PM
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
0
Accepted
Damyan Bogoev
Telerik team
answered on 14 Oct 2010, 05:07 PM
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
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 14 Oct 2010, 05:25 PM
Awesome thanks!

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

*EDIT* FYI, that works fantastic, thanks
Tags
Feature Requests
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Damyan Bogoev
Telerik team
Share this question
or