Structured Queries macro @Table not compatible with default settings of MutablePersistableRecord table naming #59
-
DescriptionI followed the migration docs and it had no mention of removal of Checklist
Expected behaviorThe workaround is either switching the table name via I would like to be able to use the default Actual behaviorHere is it demonstrated in the example project: Add this back under the and where Then run the project, and we'll see: Reproducing projectmutablePersistableRecordBug.patch apply this patch to the example project SharingGRDB version information0.2.2 Sharing version information2.4.0 GRDB version information7.4.1 Destination operating systemiOS 18 Xcode version informationNo response Swift Compiler version information |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @whoyawn, This behavior comes from StructuredQueries, and is working as intended. StructuredQueries is designed to work with any database or database library, not just GRDB. We have decided to adopt the convention of pluralization (used by Ruby on Rails, for example) rather than GRDB's convention. If you are migrating existing types that use the GRDB convention, you must pass an explicit table name to the Because this is not a bug in the library I'm going to convert it to a discussion. |
Beta Was this translation helpful? Give feedback.
Hi @whoyawn,
This behavior comes from StructuredQueries, and is working as intended. StructuredQueries is designed to work with any database or database library, not just GRDB. We have decided to adopt the convention of pluralization (used by Ruby on Rails, for example) rather than GRDB's convention.
If you are migrating existing types that use the GRDB convention, you must pass an explicit table name to the
@Tablemacro, as you mention as a workaround.Because this is not a bug in the library I'm going to convert it to a discussion.