Search code examples
phantom-dsl

snake case for column names in phantom-dsl


Im trying to use this library for an existing application that already have records in cassandra and it table columns are written in snake case. Is there a way to have my phantom model objects in snake case.


Solution

  • Have a look here, at the official documentation.

    import com.outworkers.phantom.NamingStrategy.SnakeCase.caseSensitive
    import com.outworkers.phantom.NamingStrategy.SnakeCase.caseInsensitive
    

    There is also a test suite that might be of help, but you need to import this in every file where you define tables. Tests are here.