Skip to content

Instantly share code, notes, and snippets.

@nakamura-to
Created April 19, 2020 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakamura-to/5152beb359eb45e17e32ebf785f20be4 to your computer and use it in GitHub Desktop.
Save nakamura-to/5152beb359eb45e17e32ebf785f20be4 to your computer and use it in GitHub Desktop.
val query = select(::_製品移動) { a ->
val b = leftJoin(::_倉庫) { b ->
eq(a.移送元倉庫id, b.倉庫id)
}
val c = leftJoin(::_倉庫) { c ->
eq(a.移送先倉庫id, c.倉庫id)
}
associate(a, b) { 製品移動, 倉庫 ->
製品移動.移送元倉庫 = 倉庫
}
associate(a, c) { 製品移動, 倉庫 ->
製品移動.移送先倉庫 = 倉庫
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment