-
-
Notifications
You must be signed in to change notification settings - Fork 618
Closed
Description
def testDistinctManyColumns = {
case class AA(from: String, to: String, data: Int)
case class T(table: String)(tag: Tag) extends Table[AA](tag, table) {
def from = column[String]("from")
def to = column[String]("to")
def data = column[Int]("data")
def * = (from, to, data).mapTo[AA]
}
val ts = TableQuery(T("t1"))
val q2 = ts.distinctOn(t => (t.to, t.from)).sortBy(t => (t.to, t.from, t.data))
val values = Seq(
AA("from1", "to2", 1),
AA("from1", "to1", 1),
AA("from1", "to2", 11),
)
DBIO.seq(
ts.schema.createIfNotExists,
ts ++= values,
q2.result.map(_ shouldBe Vector(
AA("from1", "to1", 1),
AA("from1", "to2", 1),
)),
// DBIO.failed(new Exception)
)
}
H2MemTest sometimes fails because columns in distinct are swapped
slick 3.6.0
This repo is using Opire - what does it mean? π
π΅ Everyone can add rewards for this issue commenting
/reward 100 (replace 100 with the amount).π΅οΈββοΈ If someone starts working on this issue to earn the rewards, they can comment
/try to let everyone know!π And when they open the PR, they can comment
/claim #3146 either in the PR description or in a PR's comment.πͺ Also, everyone can tip any user commenting
/tip 20 @OlegYch (replace 20 with the amount, and @OlegYch with the user to tip).π If you want to learn more, check out our documentation.
Metadata
Metadata
Assignees
Labels
No labels