Andi N. Dirgantara
Andi N. Dirgantara

Reputation: 2051

How to define column name that is Scala predefined

On Websudos Phantom DSL, how to define column name but it's already Scala's predefined variable, like type?

Example:

class MyTable extends CassandraTable[ConcreteValues, Value] {

  object id extends UUIDColumn(this) with PartitionKey[UUID]

  object type extends StringColumn(this) // <-- how to define this

}

How to define type column since it's already Scala's predefined variable?

Upvotes: 2

Views: 232

Answers (2)

Ram
Ram

Reputation: 46

...or name your scala column to something legal and override the column-name mapping:

object somthingType extends StringColumn(this) {override lazy val name = "type"}

Upvotes: 1

Andi N. Dirgantara
Andi N. Dirgantara

Reputation: 2051

As on question's comments said, generally it can be defined via backticks. Thank you for the help guys.

Upvotes: 2

Related Questions