-
For my project, I want to follow the convention where the table names are singular. I also want the row class names to be the same as the table names, using moor/drift files. For example, if the table name is 'Customer' (or 'customer'), I want the row class name to be 'Customer'. Unfortunately, the generated table class name would also be 'Customer', which conflicts with the row class name. Is there a way to override the table class names? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is undocumented (because it's a rarely needed feature with a somewhat weird API), but you can define the name for both the table and the data class like this: In your case, you could use |
Beta Was this translation helpful? Give feedback.
This is undocumented (because it's a rarely needed feature with a somewhat weird API), but you can define the name for both the table and the data class like this:
https://github.com/simolus3/moor/blob/44281bebaf1d030ffc978fff419767b210696991/drift/test/data/tables/tables.drift#L41-L44
In your case, you could use
AS "Customer/CustomerTable"
for instance.