Left join problem on none numeric data type for SquerylRecord #1174

lunaspeed opened this Issue Dec 27, 2011 · 1 comment


None yet
3 participants

When doing left join on none numeric data type there will be type miss match error

class Fund private() extends Record[Fund] with KeyedRecord[String] {
val id = new StringField(this, 8)
val lcc = new OptionalStringField(this, 8)

class Lc private() extends Record[Lc] with KeyedRecord[String] {
val lcc = new StringField(this, 8)
val name = new StringField(this, 8)

val d = join(fund, lc.leftOuter)((f, l) =>
where(f.id === "xxx")
select(f, l)
on(f.lcc === l.map(_.lcc)))

Error mismatch on last line "on(f.lcc === l.map(_.lcc))"
Due to f.lcc is converted to some sort of StringExpression[String] instead of StringExpression[Option[String]]

current work arrount is "on(Some(f.lcc) === l.map(_.lcc))"

more discussion in

rusho was assigned Mar 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment