zio-quill icon indicating copy to clipboard operation
zio-quill copied to clipboard

Using a type alias for naming strategy fails silently (but deadly)

Open nrktkt opened this issue 4 years ago • 2 comments

Version: 3.5.3 Module: async-postgres

Expected behavior

Using a type alias for a naming strategy like type NamingStrategy = CompositeNamingStrategy2[SnakeCase.type, PluralizedTableNames.type] works the same as if the aliased type had been used directly, or causes a compile error.

Actual behavior

No error is given, some default naming strategy is used instead. It seems to use case class names for tables and convert column names to lowercase.

Steps to reproduce the behavior

https://scastie.scala-lang.org/fn3kNTI1SdiVMNqteSu7cg

Workaround

none

@getquill/maintainers

nrktkt avatar Nov 23 '20 22:11 nrktkt

I've also noticed this problem

nicf82 avatar Oct 13 '22 07:10 nicf82

I noticed this because when using a type alias, all of my queries became dynamic. Too bad because it means I have to update many files if I need to change the strategy.

codestothestars avatar Feb 06 '24 22:02 codestothestars