We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is my class:
case class WidgetId(id: String) extends BaseUUID object WidgetId extends BaseUUIDMapperImplicits[WidgetId] { override def prefix: String = "W" implicit val formats: Format[WidgetId] = formatImplicit(WidgetId(_)) implicit val databaseMapper: BaseColumnType[WidgetId] = databaseImplicit(WidgetId(_)) }
Database implicit method looks like this:
def databaseImplicit(f: String => T)(implicit tag: ClassTag[T]): BaseColumnType[T] = MappedColumnType.base[T, String](r => r.id.substring(prefix.length), r => f(prefix + r))
I created a trait:
trait PrimaryUUIDColumnMapping { implicit val databaseMapperWidgetId: BaseColumnType[WidgetId] = WidgetId.databaseMapper }
Have extended this trait as mentioned in the Usage section here: https://github.com/tminglei/slick-pg.
Getting this error: Cannot convert node to SQL Comprehension\n| Path s6._2 : Vector[t2<{s3: MappedJdbcType[ids.PrimaryUUIDs$WidgetId -> String'], s4: SOption[OptionDisc/Int]>]\n
Cannot convert node to SQL Comprehension\n| Path s6._2 : Vector[t2<{s3: MappedJdbcType[ids.PrimaryUUIDs$WidgetId -> String'], s4: SOption[OptionDisc/Int]>]\n
What am I doing wrong here.
Using slick-pg 0.19.4, Tried upgrading till 0.20.4 but didn't work. Any kind of help is highly appreciated.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is my class:
Database implicit method looks like this:
I created a trait:
Have extended this trait as mentioned in the Usage section here: https://github.com/tminglei/slick-pg.
Getting this error:
Cannot convert node to SQL Comprehension\n| Path s6._2 : Vector[t2<{s3: MappedJdbcType[ids.PrimaryUUIDs$WidgetId -> String'], s4: SOption[OptionDisc/Int]>]\n
What am I doing wrong here.
Using slick-pg 0.19.4, Tried upgrading till 0.20.4 but didn't work. Any kind of help is highly appreciated.
The text was updated successfully, but these errors were encountered: