lift / framework

Lift Framework
http://liftweb.net
Apache License 2.0
1.27k stars 276 forks source link

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

Closed lunaspeed closed 1 month ago

lunaspeed commented 12 years ago

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 [[url:https://groups.google.com/group/liftweb/browse_thread/thread/eb88859a2ca51f9b/e9b97b357c06be1c|ExampleName]]

github-importer commented 12 years ago

Imported from Assembla: http://www.assembla.com/spaces/liftweb/tickets/1174

farmdawgnation commented 1 month ago

This issue / PR is being closed because the Lift community has decided to decomission the Lift Persistence group of libraries including Mapper, Record, et al. We encourage folks to check out using some alternatives for their persistence needs. In particular the following libraries may be of interest:

There are likely others, as well! Please feel free to reach out on the Lift Mailing List if you have any questions or concerns.