Eager Loading Feature

15 views
Skip to first unread message

mclif...@gmail.com

unread,
Oct 20, 2016, 10:47:56 PM10/20/16
to Squeryl
Hi all,

Looks like things are moving forward, and that's great to see!

Just curious if there's interest in merging my include feature. The quick and dirty rundown is that it allows you to "include" other relations:

val manager = transaction {
  val p = IncludeSchema.managers.insert(new Manager("person"))
  val c = IncludeSchema.employees.insert(new Employee("child", p.id))

  from(IncludeSchema.managers)(p => select(p) include(_.-*(_.employees))).head
}

assert(manager.employees.size == 1)

I submitted a pull request quite a while ago, but now it looks like it'll need some fixes to get it merged in properly with the latest version. I have no problem with doing the work, I'd just like to know if the community feels like it's a worthy addition that fits the goals of the library.

You can find the pull request here, it has a lot more information about the feature, including examples:


Thanks!
-Matt
Reply all
Reply to author
Forward
0 new messages