0
votes

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.

2

2 Answers

1
votes

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.

1
votes

Just override column name:

abstract class User extends Table[...] {

   object lastName extends StringColumn {
       override val name: String = "last_name"
   }

}