avolkmann
04/12/2018, 1:55 PMJohan Vergeer
04/15/2018, 5:16 PMreferrersOn
, and I changed it in the Wiki so others can benefit.Johan Vergeer
04/16/2018, 3:50 PMspand
04/23/2018, 7:12 AMavolkmann
04/23/2018, 11:14 AMslice
avolkmann
04/23/2018, 11:37 AMAlias
in a join, why does the referee
disappear, causing an ExceptionSmith
04/27/2018, 2:11 PMAdrian M
05/01/2018, 3:20 PMKabbura
05/07/2018, 9:23 AMPere Casafont
05/09/2018, 2:27 PMPere Casafont
05/10/2018, 12:06 PMEvgeniy Zaharov
05/11/2018, 10:11 AMMarcin Wisniowski
05/13/2018, 11:25 PMfind()
is Accounts.character eq character
. How do I make this case insensitive?Marcin Wisniowski
05/14/2018, 5:51 PMUser.find { Users.city.name eq "London" }
This doesn't work, because I cannot access properties of the city
reference this way, what's the correct way? This could be normally solved with a join, but I can't find anything on joins with the DAO API. I'm struggling to find a way that doesn't involve loading all the users from the database just to filter them in application code.Marcin Wisniowski
05/17/2018, 12:01 AMUser.find { Users.confirmed eq true }.sortedBy { it.loginTimestamp }.take(10)
It works, but is it efficient or does it load all users from the database? I'm not sure if the limiting and sorting is done inside the database, or in my code, it looks like it's done in my code, but I want it to happen as part of the query.Tristan Caron
05/17/2018, 2:25 PMselect count(distinct my_column) from my_table where my_other_column = true
I have started the fellowing, but I don't know I can achieve what I would like
MyTable.select {
MyTable.myOtherColumn.eq(true)
}.withDistinct().count()
Any ideas?Chris
05/18/2018, 8:15 AMerror occurred during batching: batch must be either executed or cleared
. Is there something I am missing. This is all I have: Database.connect("jdbc:oracle:thin:@localhost:1521/xe", driver = "oracle.jdbc.OracleDriver",user = "XXXX", password = "XXXX")
transaction(java.sql.Connection.TRANSACTION_READ_COMMITTED,1){
PaymentOption.selectAll().forEach { println(it[PaymentOption.paymentPlanCode]) }
}
I am using Maven btwMarcin Wisniowski
05/22/2018, 3:56 PMlogger.removeLogger(Slf4jSqlLogger)
seems to work, but only for one transaction when put into that transaction.Allan Wang
05/22/2018, 4:16 PMfun <ID : Comparable<ID>, T : Entity<ID>> EntityClass<ID, T>.newOrUpdate(id: ID, update: T.() -> Unit): T {
val existing = findById(id)
return if (existing != null) existing.apply(update)
else new(id, update)
}
But there is an unnecessary query if the entity isn't cached. This method aims to just end up with a new entity with the supplied id, regardless of whether it exists alreadyoshai
05/30/2018, 6:22 AMorg.jetbrains.exposed.sql.vendors.MysqlDialect
and with 10.0.2 we had 277725 instances when I took a memory dump. So it is either a leak or we are not using exposed as we should with the new version. Do you have an idea what can go wrong?danielm
05/30/2018, 9:49 AMdanielm
05/31/2018, 2:03 PMProduction
.innerJoin(Organization, { Organization.organizationId }, { Production.organizationId })
.innerJoin(Performance, { Production.productionId }, { Performance.productionId })
.slice(Production.name, Performance.date)
.select { Organization.id eq organizationId }
.orderBy(Performance.date)
.distinct()
.forEach {
println("${it[Production.name]}")
}
danielm
05/31/2018, 2:04 PMdanielm
05/31/2018, 2:09 PMdanielm
06/01/2018, 7:30 AMToby
06/01/2018, 10:20 AMdate()
column (postgres Date
) and I can store dates correctly in it.
However, when I read from the database, it seems to create a DateTime with a one hour offset:
Ie, I store 2018-04-27
in the db, it gets read as 2018-04-27T00:00:00.000+01:00
which is 2018-04-26
Damien
06/06/2018, 7:51 PMBorzdeG
06/07/2018, 6:14 PMEntity.all()
be sorted by default on the primary key? Now for each request, we have to write Entity.all().sortedBy{ it.id }
Hamza
06/11/2018, 9:32 AMoshai
06/14/2018, 10:21 AMoshai
06/14/2018, 10:21 AMtapac
06/14/2018, 10:27 AMoshai
06/14/2018, 10:34 AMtapac
06/14/2018, 10:34 AMoshai
06/14/2018, 12:34 PM