Skip to content

Conversation

@alex-kulakov
Copy link
Contributor

Contains a bunch of small fixes:

  1. Fixes issue when EntithChangeRegistry.Count value becomes corrupted.
  2. Fixes reference synchronization during entity removal. Full case represented in IssueJira0792_* file.
  3. Addresses an issue when during constraint validation of a lazy-load field its value happens to be fetched even the field isn't changed
  4. Removes extra SELECT wrap for cases when TypeId value is the only calculated column in query. There is no point in it. It also fixes an issue when usage of In() extension in filter of bulk operations produces invalid query, for instance
var idsToUpdate = new[] { 99, 100, 102 };
var updatedCount =  session.Query.All<Bar>()
  .Where(b => b.Id.In(idsToUpdate))
  .Update(bar => new Bar(session) { Name = prefix + bar.Name });

Count could be desynchronized with collection contents
during movements between states
- Fixed case when lazy load field fetched even if it has no constraint
- Fixed but when validation tries to run on fields without constraints
- Used late field value getting. Now validator gets value only when it is about
to validate it. It is especially useful with lazy load fields.
Queries of a lot of entities have type Id as constant value column
included to sql query and this cause SELECT ... FROM (SELECT)
queries where outer select just used all the fields from inner select.
For some cases such wrapping was turned off.
# Conflicts:
#	Orm/Xtensive.Orm.Tests/Xtensive.Orm.Tests.csproj
Test renames, some test structure improvements
- check real registered entities and then count
- use factory method for state creation across all tests
- remove test that copies already existed test
- renames
@AlexUstinov
Copy link
Contributor

Hi @alex-kulakov
I've notices UnicodeNamesTest is shown as binary file in github (see
https://github.com/DataObjects-NET/dataobjects-net/pull/34/files#diff-f36b0aa3eba6c46119b3b079d36a3ce3).
It doesn't show differences because of this.
Could you please check?

@alex-kulakov
Copy link
Contributor Author

alex-kulakov commented Jul 30, 2020

Seems to be that it is shown as binary after one of PRs merged into the master branch where file encoding was changed. I'll fix it in this PR.

@alex-kulakov
Copy link
Contributor Author

alex-kulakov commented Jul 30, 2020

I have changed encoding for the file to UTF-8 and has to change it to commit but the file is still shows it as binary. Hmmm. Locally the file is threated as a text file though

AlexUstinov
AlexUstinov previously approved these changes Jul 30, 2020
@alex-kulakov alex-kulakov merged commit 5ae4635 into master Aug 7, 2020
@alex-kulakov alex-kulakov deleted the master-various-hotfixes branch August 10, 2020 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants