Skip to content

[9.x] Implement Data::find() support for Runway models#825

Merged
duncanmcclean merged 1 commit into
9.xfrom
model-repository-find
May 28, 2026
Merged

[9.x] Implement Data::find() support for Runway models#825
duncanmcclean merged 1 commit into
9.xfrom
model-repository-find

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request implements Data::find() support for Runway models, allowing them to be resolved via their reference string (e.g. runway::post::uuid).

This was needed because Statamic 6's new ReplicatorSetController uses Data::find() to resolve the parent model when adding sets. Without this, users encountered a database error:

SQLSTATE[22P02]: invalid input syntax for type uuid: 'runway::{model}::{uuid}'

This PR implements it by:

  1. Changing the DataRepository registration key from runway-resources to runway to match the reference prefix used by Runway models
  2. Adding a find() method to ModelRepository that parses handle::id references and returns the corresponding Eloquent model

Fixes #809

@duncanmcclean duncanmcclean changed the title Implement Data::find() support for Runway models [9.x] Implement Data::find() support for Runway models May 28, 2026
@duncanmcclean duncanmcclean merged commit 9514b3d into 9.x May 28, 2026
16 of 17 checks passed
@duncanmcclean duncanmcclean deleted the model-repository-find branch May 28, 2026 09:41
@github-actions
Copy link
Copy Markdown

Released as part of v9.5.0.

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.

Can't add Replicator sets after update to Statamic 6

1 participant