Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding first stage Alternate Key Support #219

Closed
wants to merge 12 commits into from
Closed

Conversation

abkmr
Copy link
Contributor

@abkmr abkmr commented Jun 8, 2015

first stage implementations with unit test for Alternate Keys.

Added Alternate Keys vocabulary definitions, as per vocabulary spec defined on the alternate key vocabulary.

Added Extensions to IEdmEntityType Definition, to allow for creation and retrieval of alternate keys with corresponding aliases for each structural attribute

Added AlternateKey binding and resolution support based upon what the corresponding model contains for the given

abkmr added 2 commits June 5, 2015 11:04
Alternate Keys first stage Implementation, with all build issues and
warnings fixed. Added unit tests.
Adding unit test
@msftclas
Copy link

msftclas commented Jun 8, 2015

Hi @abkmr, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@abkmr
Copy link
Contributor Author

abkmr commented Jun 8, 2015

#55

@msftclas
Copy link

msftclas commented Jun 8, 2015

@abkmr, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@xuzhg xuzhg self-assigned this Jun 9, 2015
@xuzhg xuzhg added this to the 6.13 or later milestone Jun 9, 2015
@xuzhg xuzhg added the FollowUp label Jun 9, 2015
Allowing correct exception handling for composite alternate keys.
@@ -1597,6 +1597,95 @@ public static IEnumerable<IEdmStructuralProperty> Key(this IEdmEntityType type)
}

/// <summary>
/// Gets the declared alternate keys of the most defined entity with a declared key present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these extension methods to the server library: OData Web API, or create a new set of API. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is dependency from the ODL library code for these extensions, hence they need to be in ODL.

abkmr added 3 commits June 23, 2015 12:08
Unit tests fixes. Code cleanup. Adding fix for enum as string in key.
Fixing unit test failures
Removing warnings
using Microsoft.OData.Edm.Validation;


namespace Microsoft.OData.Edm.Vocabularies.V1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft.OData.Edm.Vocabularies.Community.V1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

karataliu and others added 4 commits June 24, 2015 16:57
Add edm test cases for alternate key.
…nit tests.

Addressing review comments. Updating namespace for alt keys. Fixing unit
tests.
…d type AlternateKeysOdataUriResolver.

Removing Alternate Key changes from ODataUriResolver. Creating derived
type AlternateKeysODataUriResolver. Unit test fixes.
book.AddKeys(prop1);
book.AddAlternateKey(model, new Dictionary<string, IEdmProperty> { { "s2", prop2 } });
book.AddAlternateKey(model, new Dictionary<string, IEdmProperty> { { "s3", prop3 }, { "s4", prop4 } });

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Code review comments, fixes.
This was referenced Jun 29, 2015
xuzhg pushed a commit that referenced this pull request Jun 30, 2015
For alternate key Protocol,
Please refer to: OData/vocabularies#9
@xuzhg
Copy link
Member

xuzhg commented Jun 30, 2015

Merged the PR. Thanks.

@xuzhg xuzhg closed this Jun 30, 2015
@don01001100
Copy link

Do you know when these changes will make it to the nuget package?

@abkmr
Copy link
Contributor Author

abkmr commented Jul 8, 2015

Hi Don. These changes are available through the nightly builds of odata Libraries that you can get from https://www.myget.org/gallery/odlnightly. They will also be part of 6.13 release for ODL.

@don01001100
Copy link

Thanks, Abhishek. Do you know how I would use these changes with a model built using ODataConventionModelBuilder? I'm not sure how to get from there to an IEdmEntityType.

hotchandanisagar pushed a commit to hotchandanisagar/odata.net that referenced this pull request Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants