dart_neo4j_ogm 1.2.0
dart_neo4j_ogm: ^1.2.0 copied to clipboard
Annotations for Neo4j Object-Graph Mapping (OGM) code generation in Dart.
1.2.0 #
- Version bump for consistency with dart_neo4j ecosystem
1.1.0+1 #
- Refactored
CypherElementIdandCypherIdto use const factories
1.1.0 #
Notes #
- Version bump for compatibility with dart_neo4j_ogm_generator 1.1.0
- No changes to annotations or API
- Generated code from dart_neo4j_ogm_generator 1.1.0 includes breaking changes:
nodeLabelis now static const (access viaClassNameCypher.nodeLabel)cypherPropertyNamesis now a static const Record type
1.0.0 #
BREAKING CHANGES #
- Deprecated
CypherId: TheCypherIdtype is now deprecated in favor ofCypherElementIdfor Neo4j 5.0+ compatibility- Use
CypherElementIdfor new code targeting Neo4j 5.0+ - Existing code using
CypherIdwill continue to work but will emit deprecation warnings - Both types can coexist in the same class during migration
- Use
New Features #
- CypherElementId Type: Added type-safe
CypherElementIdsealed class for Neo4j 5.0+ string-based element IDsCypherElementId.none()for new nodes without element IDsCypherElementId.value(String)for existing nodes with Neo4j-generated element IDs- Built-in JSON serialization support with
cypherElementIdToJsonandcypherElementIdFromJsonhelpers - Same API surface as
CypherIdfor easy migration - Supports nullable element IDs with
elementIdOrNullandhasNoElementIdproperties
- Dual ID Support: Classes can now have both
CypherIdandCypherElementIdfields for gradual migration - Enhanced Type Safety: String-based element IDs provide better type checking and Neo4j 5.0+ compatibility
Improvements #
- Smooth Migration Path: Deprecation warnings guide users to migrate at their own pace
- Backward Compatibility: Existing
CypherIdcode continues to work without changes
Deprecations #
CypherIdclass - UseCypherElementIdinsteadcypherIdToJson()helper - UsecypherElementIdToJson()insteadcypherIdFromJson()helper - UsecypherElementIdFromJson()instead
0.2.0 #
BREAKING CHANGES #
- Mandatory CypherId ID Fields: All
@cypherNodeclasses now require aCypherId idfield instead ofintorString - Removed fromCypherMap: Replaced
fromCypherMapfactory withfromNodefactory for Neo4j Node integration - Automatic ID Exclusion: ID fields are now automatically excluded from Cypher properties regardless of annotations
New Features #
- CypherId Type: Added type-safe
CypherIdsealed class for handling Neo4j node identitiesCypherId.none()for new nodes without IDsCypherId.value(int)for existing nodes with Neo4j-generated IDs- Built-in JSON serialization support with
cypherIdToJsonandcypherIdFromJsonhelpers
- fromNode Factory: New factory method for creating instances from Neo4j
Nodeobjects- Extracts ID from
node.idand properties fromnode.properties - Handles property mapping and type conversion automatically
- Validates required fields and handles nullable properties
- Extracts ID from
- Enhanced JSON Support: Full integration with json_serializable for dual JSON/Cypher serialization
Improvements #
- Better Documentation: Comprehensive README with examples, API reference, and integration guides
- Freezed + JSON Integration: Complete examples for using Freezed with json_serializable
- Error Handling: Improved error messages and validation for missing required fields
- Type Safety: Enhanced compile-time type checking with CypherId system
Documentation #
- Added mandatory ID field requirements section
- Added complete Neo4j integration examples
- Added JSON serialization examples with Freezed
- Updated all code examples to use CypherId
- Added fromNode factory usage documentation
- Corrected license information (GPL v3.0)
0.1.0 #
- Initial release of dart_neo4j_ogm package
- Added @cypherNode annotation for marking classes for OGM code generation
- Added @CypherProperty annotation for controlling field-level Cypher generation behavior