ormed 0.1.0-dev+7
ormed: ^0.1.0-dev+7 copied to clipboard
Strongly typed ORM core primitives (annotations, metadata, codecs, and generator) for the routed ecosystem.
Changelog #
0.1.0-dev+7 #
- Added: Transaction outcome hooks/events that distinguish commit vs rollback (with savepoint scope details).
- Added: Transaction boundary logging in query logs (BEGIN/COMMIT/ROLLBACK and savepoints).
- Added: Analyzer plugin is now included in
ormed(no separateormed_analyzerpackage). - Added: Analyzer diagnostics for select/order/group/having validation, nested relation checks, relation callback field mismatch, missing pivot fields, type-aware predicates, query safety (limit/order + unbounded get/all), raw SQL alias checks, DTO validation, and soft-delete/timestamp misuse; supports split-chain tracking.
- Fixed:
copyWithnow casts non-nullableObjectfields to avoid analyzer errors.
0.1.0-dev+6 #
- Added: Typed predicate field accessors for
wherecallbacks (e.g.q.title.eq(...)) and typed relation helpers (withPosts,whereHasPosts). - Added: Generated
copyWithextensions for user-defined models with sentinel-based null handling, including constructor-backed relation fields. - Added: Generated
toMap/fromMaphelpers for user and tracked models using column-name maps. - Added: Driver extension registry and query builder hooks (
selectExtension,whereExtension,orderByExtension,groupByExtension,havingExtension, join constraints). - Added: Full-text query compilation for
whereFullTextacross Postgres, MySQL/MariaDB, and SQLite, including optional index targeting. - Docs: Added driver extension tutorial and examples.
- Added: DataSource logging can now use an injected contextual
loggerand exposes it for inspection.
0.1.0-dev+5 #
- Fixed: Treat driver SQL NULL wrapper values as null when applying timestamp defaults.
- Improved: Generated codecs now omit virtual attributes (timestamps/soft deletes) unless explicitly set.
- Added: Core tests for SQL NULL handling helpers.
- Fixed: JSON casts now accept raw strings and mixed JSON values for
Object?fields. - Fixed: JSON cast decoding now handles byte payloads from MySQL/MariaDB drivers.
- Fixed: Map/DTO insert & upsert inputs now apply field codecs (casts) consistently.
- Changed: Automatic timestamps now use plain UTC time without monotonic state.
0.1.0-dev+4 #
- Added: Relationship touching with
touches,touch(), andtouchOwners()for keeping relatedupdated_atvalues in sync. - Added:
withoutTouchingOn/withoutTimestampsOnscopes to suppress automatic touching or timestamp updates. - Added:
@OrmModel(timestamps: false)to disable automatic timestamp updates while still using timestamp fields. - Improved: Timestamp casting accepts numeric epoch inputs (seconds) in addition to
DateTime/Carbon types. - Added: Through relations support with
hasOneThroughandhasManyThroughrelation types. - Added: Polymorphic relations with
morphTo,morphToMany, andmorphedByManysupport. - Added: Attribute accessors and mutators for get/set interception.
- Added: Appended/computed attributes for serialization.
- Added: Extended attribute casting system with custom cast handlers.
- Added: Pivot enhancements including
withPivotfield selection and pivot timestamps. - Added: Raw query helpers
orderByRawandgroupByRaw. - Fixed:
updatedAtnow respects explicitly provided values during updates (dirty-check aware). - Added: Object input support for
fill,forceFill, andfillIfAbsentmethods. - Refactored: Decoupled database drivers from the core package. Drivers now register themselves via
DriverAdapterRegistry. - Added:
DataSource.fromConfigas the standard, driver-agnostic entry point for ORM initialization. - Added:
syncWithoutDetaching,syncWithPivotValues,toggle, andupdateExistingPivotmethods forManyToManyrelationships. - Added: Support for eager loading nested relations (e.g.,
ds.query<User>().with('posts.comments').get()). - Added:
copyWithmethod generation for DTOs and partial models. - Added:
suppressEventsoption toQueryfor optimized bulk operations. - Added:
loadOrmConfig()andfindOrmConfigFile()convenience helpers for configuration management. - Fixed: Eager loading for models with custom primary keys (Issue #12).
- Fixed: Improved relation inference for complex naming conventions and ambiguous foreign keys (Issue #7).
- Fixed: Missing relation accessors in generated models for certain edge cases (Issue #6).
- Fixed: Resolved bugs #4, #11, and #13 related to query builder edge cases.
- Improved: Code generator now emits dartdoc comments for all generated models and members.
- Improved: Reached 160/160 pub score with expanded documentation and examples.
0.1.0-dev+3 #
- Fixed: Timestamp getters (
createdAt,updatedAt,deletedAt) now return immutable Carbon instances to prevent accidental mutation of model state when chaining date methods likesubDay(). - Refactored
TimestampsandSoftDeletesmixins to useCarbonInterfacefor getters andObject?for setters. - Exported
carbonizedpackage directly fromormed.dart. - Improved
DateTimeCodecto handleCarboninstances during decoding. - Fixed mass assignment to handle both field and column names for excluded attributes.
- Optimized Postgres test performance using transactional isolation.
- Fixed SQLite test cleanup issue where
test_g*files were left behind. - Expanded testing documentation with isolation strategies and concurrency guides.
- Updated doc comments to follow Effective Dart guidelines.
0.1.0-dev+2 #
- Synchronized release with ormed_cli rebranding.
0.1.0-dev+1 #
- Added automatic
snake_casecolumn name inference for model fields. - Fixed
DatabaseSeeder.seed<T>()to use repositories for correct data encoding. - Fixed
bootstrapOrm()to ensure model registration in existing registries. - Improved documentation for naming conventions and CLI-first workflow.
0.1.0-dev #
- Initial release.