Skip to content

Commit

Permalink
Merge pull request #243 from Flexberry/feature-add-master-master-prop…
Browse files Browse the repository at this point in the history
…-in-view-for-5.1.2

Fix add in dynamic view master master prop
  • Loading branch information
Bratchikov Igor committed Jan 18, 2022
2 parents aaad2da + 46fc494 commit 2b6c40e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
9 changes: 2 additions & 7 deletions NewPlatform.Flexberry.ORM.ODataService.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>NewPlatform.Flexberry.ORM.ODataService</id>
<version>5.1.1</version>
<version>5.1.2</version>
<title>Flexberry ORM ODataService</title>
<authors>New Platform Ltd.</authors>
<owners>New Platform Ltd.</owners>
Expand All @@ -12,13 +12,8 @@
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Flexberry ORM OData Service Package.</description>
<releaseNotes>
Added
1. The maximum number of top level query operations and changesets allowed in a single batch parameter, set default as 1000.
Fixed
1. Update and delete details by batch update.
2. Exponential format for numeric values serialization issue.
3. SafeLoadDetails add details DataCopy to DataCopy DetailArray.
4. Load emty agregators in SafeLoadDetails.
1. Add in dynamic view master master prop
</releaseNotes>
<copyright>Copyright New Platform Ltd 2020</copyright>
<tags>Flexberry ORM OData ODataService</tags>
Expand Down
22 changes: 20 additions & 2 deletions NewPlatform.Flexberry.ORM.ODataService/Model/DynamicView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,27 @@ public static View GetViewWithPropertiesUsedInExpression(Expression expr, Type d
addProp = propName;
}

if (!string.IsNullOrWhiteSpace(addProp) && !detailView.CheckPropname(addProp))
if (!string.IsNullOrWhiteSpace(addProp))
{
detailView.AddProperty(addProp);
string[] props = addProp.Split('.');

string currentProp = string.Empty;
foreach (var prop in props)
{
if (string.IsNullOrWhiteSpace(currentProp))
{
currentProp = prop;
}
else
{
currentProp += $".{prop}";
}

if (!detailView.CheckPropname(currentProp))
{
detailView.AddProperty(currentProp);
}
}
}
}

Expand Down

0 comments on commit 2b6c40e

Please sign in to comment.