kind of a follow up question to my previous one: squeryl date to long conversion
I implemented a DateTime(model) to Long(DB) conversion as mentioned in that thread.
I wrote a simple query to delete all records with an expired date:
println("deleting expired")
val now: DateTime = new DateTime()
inTransaction {
MyDB.loginTokens.deleteWhere(t =>
t.expires lt now.getMillis
)
}
println("finished deleting")
but the query just hangs in there and does nothing, no error is thrown...
I only see "deleting expired" printed and never "finished".
I also tried "t.expires lt now" and some other variants without success.
any idea what's causing this and how to fix it?
EDIT when changing lt to .~ <, there is still a problem when changing lt to === the query works fine both with now and now.getMillis.