Repository navigation
Conversation
- EntityResolutionRules.merge: the tri-state flag merge -> _mergeFlag; the tolerant/intolerant mirror arms -> _mergeTypesDroppingConflict. - fetchTypes: four near-identical lambdas -> _typesWhere. - EntityAccessRules: _flattenGroup, _conditionMatches, _lastDefined; the block arm returns fieldRule directly. - EntityAccessRulesCached: cache fields named *Cache and documented. - EntityRulesResolver.contextProviders (cotextProviders kept, deprecated). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Equality: _equalsValuesScalar (the DateTime/Time/DynamicNumber/primitive/ enum chain of equalsValues and equalsValuesBasic), _isCollectionLike, _entityHandlerForValue; comparisons via _compareAsNumbers. - greaterThanValue/greaterThanOrEqualValue; the misspelled graterThan* kept as @deprecated forwarders. - Provider lookups: _asReiterable (documented), Iterable getEntityRepositoryByTypeInfo calls the Impl; _whereNotClosed without the redundant parameter; _openRepositoryOrNull; allRepositories uses traversed.add. - Transaction: identity-set caches beside _operations/_executedOperations for O(1) membership (bulk storeAll was O(n^2)). - Cascade delete: _addSubEntitiesDeleteCalls; _resolveRepositoryProvider renamed _resolveEntityRepository. - storeAllFromJson: _createAndStoreAll, named block-size constants; _logCreateFromMapError; _isFieldChanged; seed JSON _toEntitiesJson; resolveEntitySourceValueVariables flattened. - Handlers: _getCachedFieldType (shared by Generic/ClassReflection getFieldType), _inspectedOrThrow; list resolution hoisted; _resolveEntityHandler without always-true guards. - TransactionOperation: _describe() for the toString heads; TransactionOperationType.name is (this as Enum).name. - IterableEntityRepository: _relationshipFieldType, _matchesEntity, hasReferencedEntities explained. - Private cache fields named *Cache and documented (EntityHandler, GenericEntityHandler, ClassReflectionEntityHandler). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- EntityReference.fromJson: _fromInstantiator for the two instantiator blocks; uses EntityInstantiatorHandler.resolveEntityMap (the private duplicate removed). - EntityReferenceBase: _toStringPrefix and _compareIDPresence shared by EntityReference and EntityReferenceList (the list-vs-list arm now tested); dead branch in _castListNullable removed. - TypeInfo extension: parseEntity/entityType merged branches; _castEntityHandler for the castCall of toEntityReference(List). - MapGetterExtension: _parseValue (getParsed/getMultiKeyParsed tail), one key loop, _scanKeyIgnoreCase shared by getIgnoreCase and matchKeyIgnoreCase; docs name defaultValue (not def), and getMultiKeyAsString parses as String. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Time: +/- share _toOffsetDuration; _bytesInStringFormat uses _hasHmsPrefix. - EntityPagination: loadPage's sync/async success path -> _completePageLoad; _loadAllImpl's redundant final-page check removed (_isPageKnownEmpty). - isEqualsIterableDeep: paired iterators; intersectsIterableDeep iterates (materializing a lazy it2 once) instead of elementAt(i) (O(n^2) on a non-List Iterable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GenericEntityHandler.getFieldType: the entity instance is asked for the resolved field name (it was asked for the original key again). - EntityRepositoryProviderExtension.populateFromSource: forwards workingPath to resolveEntitiesSource (and resolveSource for variables). - EntityRepositoryProviderExtension.storeAllFromJson: uses transaction (forwarded to each repository) and resolves the variables placeholders (populateFromSource now lets it do so, once). - EntityReference.from / EntityReferenceList.from: forward entityHandlerProvider. - IterableEntityRepository.deleteEntity: forwards transaction. - EntityAccessRules ==/hashCode: entityFields compared/hashed element-wise (was identity). - EntityResolutionRules: allEager and allLazy both true is invalid (validate/merge throw ValidateEntityRulesError), and isEagerEntityType/isLazyEntityType no longer recurse forever on it. Tests: test/bones_api_entity_model_fixes_test.dart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gmpassos
added a commit
that referenced
this pull request
Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # CHANGELOG.md
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #208 +/- ##
==========================================
- Coverage 95.85% 95.81% -0.04%
==========================================
Files 75 75
Lines 26519 26434 -85
==========================================
- Hits 25419 25329 -90
- Misses 1100 1105 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Merged into the single v1.35.0 PR: #209. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean-up of the entity model (
bones_api_entity.dart,_entity_rules,_entity_reference,_entity_pagination,_extension,_types,_utils_collections): behavior-preserving refactors, plus a few bug fixes (separate commit, each tested).Refactors (behavior-preserving)
EntityResolutionRules.merge→_mergeFlag/_mergeTypesDroppingConflict;fetchTypes→_typesWhere;EntityAccessRules→_flattenGroup,_conditionMatches,_lastDefined(static: the class is implemented by others)._equalsValuesScalar(shared byequalsValues/equalsValuesBasic;equalsEntityReferenceBaseand==kept in place),_isCollectionLike,_entityHandlerForValue,_compareAsNumbers._asReiterable(); IterablegetEntityRepositoryByTypeInfocalls the Impl;_whereNotClosedwithout the redundant parameter;_openRepositoryOrNull;allRepositoriesusestraversed.add. List/Set extensions kept as forwarders._operations/_executedOperations(kept in sync in add/mark/dispose) for O(1) membership; the Lists still give order,op.idand the unmodifiable views._addSubEntitiesDeleteCalls;_resolveRepositoryProvider→_resolveEntityRepository._createAndStoreAll, named/documented block-size constants,_logCreateFromMapError,_isFieldChanged; seed JSON_toEntitiesJson;resolveEntitySourceValueVariablesflattened._getCachedFieldType(shared by Generic/ClassReflectiongetFieldType),_inspectedOrThrow(same messages); list resolution hoisted;_resolveEntityHandlerwithout the always-true guards._describe()for the toString heads;TransactionOperationTypeExtension.name→(this as Enum).name._relationshipFieldType,_matchesEntity;hasReferencedEntitiestail explained;_createFromMapDefaultImpluses_getIDFunction._fromInstantiator,EntityInstantiatorHandler.resolveEntityMapreused,_toStringPrefix,_compareIDPresence(list-vs-list arm now tested), dead branch in_castListNullableremoved.parseEntity/entityTypebranches,_castEntityHandler,_parseValue, one key loop,_scanKeyIgnoreCase(shared bygetIgnoreCase/matchKeyIgnoreCase, keeping each one's exact-key check); docs fixed (defaultValue,getMultiKeyAsStringparses asString)._toOffsetDuration,_hasHmsPrefix. Pagination:_completePageLoad, duplicate final-page check dropped. Collections: iterators instead ofelementAt(i).*Cache, documented (what/why), declared before the methods that fill them (EntityHandler, Generic/ClassReflection handlers,EntityAccessRulesCached).Deprecations (still working)
EntityHandler.graterThanValue/graterThanOrEqualValue→greaterThanValue/greaterThanOrEqualValue(bones_api_condition.dartstill calls the old names; untouched here).EntityRulesResolver.cotextProviders→contextProviders.Bug fixes (
test/bones_api_entity_model_fixes_test.dart; all 8 fail on the pre-fix code)GenericEntityHandler.getFieldType: asks the entity for the resolved field name.populateFromSource: forwardsworkingPath.EntityRepositoryProviderExtension.storeAllFromJson: usestransaction(forwarded to each repository;executeBlockruns inside a given transaction without committing it) and resolvesvariables(populateFromSourcenow delegates that, so it's resolved once).EntityReference.from/EntityReferenceList.from: forwardentityHandlerProvider.IterableEntityRepository.deleteEntity: forwardstransaction.EntityAccessRules==/hashCode:entityFieldselement-wise.EntityResolutionRuleswithallEagerandallLazybothtrue: invalid (validate/mergethrowValidateEntityRulesError), and theisEagerEntityType/isLazyEntityTypemutual recursion is broken (same results whenever only one is set).Version
v1.34.0 is tagged: bumped to 1.35.0 (
pubspec.yaml,BonesAPI.VERSION),## 1.35.0CHANGELOG section.Local tests
dart formatanddart analyze --fatal-infos lib test: clean. Ran (no Docker, no benchmarks): entity_rules, cov_entity_rules, cov_entity_handler, entity_provider_lookup, cov_entity_repository, cov_db_adapter_base, cov_transaction, entity_instantiate, cov_db_repository_relational, cov_entity_reference, entity, cov_extension, types, cov_types, entity_pagination, utils_collection, entity_mapping, entity_reflection, cov_security, entity_model_fixes, version (474 passed); entity_db_memory + entity_db_sqlite (480 passed); cov_condition + condition_not (84 passed). Full suites left to CI.🤖 Generated with Claude Code