Skip to content

Conversation

@abkrim
Copy link

@abkrim abkrim commented Oct 13, 2025

Implements BinaryUuidBuilder to enable Eloquent relationships when using EfficientUuid cast with BINARY(16) storage. Addresses issue #65.

Features:

  • Custom query builder that converts UUID strings to binary automatically
  • Opt-in via UsesBinaryUuidBuilder trait
  • Full support for belongsTo, hasMany, hasOne relationships
  • Eager loading support (with, whereIn queries)
  • whereNotIn support for exclusion queries

Testing:

  • 22 new comprehensive tests (78 total, 144 assertions)
  • 100% backward compatible - all existing tests pass
  • Edge cases covered (invalid UUIDs, empty arrays, qualified columns)
  • Complex query scenarios tested

Implementation:

  • Zero performance penalty for non-UUID queries
  • Strict type checking (PHPStan ready)
  • No breaking changes to existing functionality

Implements BinaryUuidBuilder to enable Eloquent relationships when using
EfficientUuid cast with BINARY(16) storage. Addresses issue michaeldyrynda#65.

Features:
- Custom query builder that converts UUID strings to binary automatically
- Opt-in via UsesBinaryUuidBuilder trait
- Full support for belongsTo, hasMany, hasOne relationships
- Eager loading support (with, whereIn queries)
- whereNotIn support for exclusion queries

Testing:
- 22 new comprehensive tests (78 total, 144 assertions)
- 100% backward compatible - all existing tests pass
- Edge cases covered (invalid UUIDs, empty arrays, qualified columns)
- Complex query scenarios tested

Implementation:
- Zero performance penalty for non-UUID queries
- Strict type checking (PHPStan ready)
- No breaking changes to existing functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant