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

Upgrade to 7.3.1 beta #203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyOriginatorKeyFile>Breeze.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
<Version>7.3.0</Version>
<Version>7.3.1-beta-01</Version>
<Description>Persistence for EF Core functionality for any Breeze Server using .NET.
Please review the Breeze documentation at http://breeze.github.io/doc-main/

Expand Down
8 changes: 7 additions & 1 deletion DotNet/Breeze.Persistence.EFCore/EFPersistenceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,19 +370,25 @@ private EntityEntry HandleModified(EFEntityInfo entityInfo) {
// Do NOT change this to EntityState.Modified because this will cause the entire record to update.
entry.State = Microsoft.EntityFrameworkCore.EntityState.Unchanged;

// TODO: modify UpdateOriginalValues so that it mark as modified the changed properties of complex (aka owned)
// entities. Once modified remove the call to MarkOwnedChildren below
// updating the original values is necessary under certain conditions when we change a foreign key field
// because the before value is used to determine ordering.
UpdateOriginalValues(entry, entityInfo);

// SetModified(entry, entityInfo.ForceUpdate);
MarkEntryAndOwnedChildren(entry, Microsoft.EntityFrameworkCore.EntityState.Modified);
MarkOwnedChildren(entry, Microsoft.EntityFrameworkCore.EntityState.Modified);


return entry;
}

private void MarkEntryAndOwnedChildren(EntityEntry entry, Microsoft.EntityFrameworkCore.EntityState state ) {
entry.State = state;
MarkOwnedChildren(entry, state);
}

private void MarkOwnedChildren(EntityEntry entry, Microsoft.EntityFrameworkCore.EntityState state ) {

// Handle owned entities - ( complex types).
var ownedNavs = entry.Navigations.Where(n => n.Metadata.TargetEntityType.IsOwned());
Expand Down
8 changes: 8 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--<clear />-->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="mrisoftware" value="https://pkgs.dev.azure.com/mrisoftware/_packaging/mrisoftware/nuget/v3/index.json" />
</packageSources>
</configuration>
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ The recent sources and solutions are in the [breeze.server.net](https://github.c

Test solutions are in the **Tests/Test.AspNetCore.EFCore** folder.

## Publishing Breeze to private mri nuget feed

1. Merge feature branch into mri/master
2. Update the Version attribute in the csproj file that is changing (eg DotNet/Breeze.Persistence.EFCore/Breeze.Persistence.EFCore.csproj)
3. Commit and push mri/master branch
4. Build, pack and publish sources:

```bash
dotnet pack DotNet/Breeze.Persistence.EFCore/Breeze.Persistence.EFCore.csproj -c Release
# IMPORTANT: change n.n.n-beta-nn to match the Version attribute value in Breeze.Persistence.EFCore.csproj file
dotnet nuget push --source mrisoftware --api-key az --interactive DotNet/Breeze.Persistence.EFCore/bin/Release/Breeze.Persistence.EFCore.n.n.n-beta-nn.nupkg
```

---

If you have discovered a bug or missing feature, please create an issue in the [breeze.server.net github repo](https://github.com/Breeze/breeze.server.net).
Expand Down