0

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.

Community
  • 1
  • 1
samz
  • 1,592
  • 3
  • 21
  • 37

1 Answers1

0

t.expires.~ lt now

Notice the dot tilda.
Not sure why "lt" by itself doesn't work, like === works.
perhaps its a synonym to something else...

samz
  • 1,592
  • 3
  • 21
  • 37