Skip to content

Conversation

@ajcvickers
Copy link
Collaborator

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.
@ajcvickers ajcvickers requested a review from a team as a code owner October 2, 2025 13:43
@ajcvickers ajcvickers requested review from papafe and removed request for a team October 2, 2025 13:43
@evergreen-ci-prod
Copy link

There is an existing patch(es) for this commit SHA:

Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'.

@ajcvickers ajcvickers requested review from damieng and removed request for papafe October 2, 2025 13:43
}

internal static BsonSerializationInfo GetPropertySerializationInfo(IReadOnlyProperty property)
internal static BsonSerializationInfo GetPropertySerializationInfo(string? alias, IReadOnlyProperty property)
Copy link
Member

Choose a reason for hiding this comment

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

We should make the alias optional and come after property rather than passing null in some paths.

if (property != null)
{
serializationInfo = BsonSerializerFactory.GetPropertySerializationInfo(property);
serializationInfo = BsonSerializerFactory.GetPropertySerializationInfo(null, property);
Copy link
Member

Choose a reason for hiding this comment

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

Then this won't need to change. No alias, no argument.

private static void WriteProperty(IBsonWriter writer, object? value, IProperty property)
{
var serializationInfo = BsonSerializerFactory.GetPropertySerializationInfo(property);
var serializationInfo = BsonSerializerFactory.GetPropertySerializationInfo(null, property);
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@ajcvickers ajcvickers merged commit 5513a93 into mongodb:feature-select-projections Oct 7, 2025
16 checks passed
ajcvickers added a commit to ajcvickers/mongo-efcore-provider that referenced this pull request Oct 7, 2025
…b#240)

* EF-76: Flow EF metadata down through CreateGetValueExpression

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.

* Updates based on co-pilot review.
ajcvickers added a commit that referenced this pull request Oct 8, 2025
* EF-76: Flow EF metadata down through CreateGetValueExpression

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.

* Updates based on co-pilot review.
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.

2 participants