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

Fix #3244 allow id to be set on non generic DefaultMappingFor() #3346

Merged
merged 2 commits into from Aug 14, 2018

Conversation

Mpdreamz
Copy link
Member

No description provided.

Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

I left a comment on the Id property naming

/// <summary>
/// The property for <see cref="ClrType"/> to resolve ids from.
/// </summary>
string IdPropertyVerbatim { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm personally not keen on the Verbatim suffix; is this to indicate that the string value will be taken as exactly as is, to infer the Id property? If it is, my personal preference would be to indicate this in XML comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

It;s mainly because we already have IdProperty being Expression<Func<TDocument, object>> so we need two properties. Suggestions on a different name?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK I see, where IClrTypeMapping<TDocument> implements IClrTypeMapping.

Maybe IdPropertyName, in line with IndexName, TypeName and RelationName?

Copy link
Member Author

Choose a reason for hiding this comment

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

Better! Will amend.

@Mpdreamz Mpdreamz force-pushed the feature/id-property-default-mapping-for-non-generic branch from 2048115 to 7d855c1 Compare August 14, 2018 12:25
@Mpdreamz Mpdreamz merged commit 04f5635 into 6.x Aug 14, 2018
@Mpdreamz Mpdreamz deleted the feature/id-property-default-mapping-for-non-generic branch August 14, 2018 12:26
Mpdreamz added a commit that referenced this pull request Aug 14, 2018
* Fix #3244 allow id to be set on non generic DefaultMappingFor()

* Rename IdPropertyVerbatim to IdPropertyName

(cherry picked from commit 04f5635)
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.

None yet

2 participants