-
Notifications
You must be signed in to change notification settings - Fork 933
Allow to use dynamic objects as dynamic components #1778
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
Conversation
f650789
to
34c0693
Compare
d2ad250
to
5f1bf8d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit added for updating the documentation. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -48,7 +48,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="log4net" Version="2.0.8" /> | |||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.8" /> | |||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.8.11" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 1.0.8 version did not work on mono/.NET Core due to this bug: zzzprojects/System.Linq.Dynamic.Core#157. So updated to latest.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -206,6 +222,18 @@ private HqlTreeNode VisitNhNominated(NhNominatedExpression nhNominatedExpression | |||
|
|||
private HqlTreeNode VisitInvocationExpression(InvocationExpression expression) | |||
{ | |||
//This is an ugly workaround for dynamic expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In .NET Core/Mono the DynamicExpression
is "reduced" to a CallSite delegate call, but on full .NET it does not happen.
Regardless of the views on relations with |
0cf80d9
to
dd0debd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashed.
I wonder. The System.Linq.Dynamic.Core supports only |
I am not knowledgeable enough in that area for telling. Would it allow to better support querying a component sub-collection? (I mean, if a dynamic component owns a collection, currently trying to apply to it an |
Unlikely
However, this would probably work now: customers.Where("Enumerable.Any(Phones, p=>p.Number = @0)", "1234"); |
I have taken a look at it. The other types are Supporting About the setters, maybe it could make sense to support them for NHibernate linq Update: and there are also |
Yes, these are the ones which potentially interest us. Others are not so interested.
Again, this is not supported by the "dynamic" provider. Also, I could not find any provider which does support/use We could write tests which construct the desired expressions and add support for them, but do we want to do this? |
Without concrete use cases, no. |
Just force-pushed to be inline with the master. No changes. |
Related #947 |
Any reason for not merging this? |
I wanted to keep these as 2 commits, which will require to rebase on master once again. But I never got time to finish. |
I have locally checked the rebase, no trouble, no conflict to resolve. It also seems the two commits of this PR could be directly merged (with merge commit) without a rebase. Maybe were you thinking about #1452, on which I have the same question, and that I consider merging very soon. |
7349d19
to
92ce88a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased.
92ce88a
to
5df1fde
Compare
Rebased with fix. |
I intend to merge it as soon as test pass, please do not merge anything to master before this PR is merged. |
Sorry for the tautology