1

I'm having some trouble getting Squeryl and Oracle-SQL to save my timestamp(6) data with millisecond precision. Every attempt I've made always shows me back the results with second precision, not millisecond:

case class BookingEvent(created: Timestamp, ...)

LoggingDatabase.bookingEvents.insert(BookingEvent(new Timestamp(System.currentTimeMillis()), ...)

But querying this always gives me back stuff as: 14.08.17 16:40:50.000000000, this being also true when I query stuff directly in SQL Developer. I've tried manually adding in SQL Developer timestamps with higher precision and it seems to work wonderfully, so this either has to do with Java's timestamps or JDBC or Squeryl?

EDIT: The problem is definitely in the writting side, as if I put something by hand in the DB and then attempt to read it through Squeryl everything seems ok.

Am I missing something obvious?

Thanks

devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • [According to this](http://squeryl.org/schema-definition.html), both Date and Timestamp seem to correspond to Oracle's date data type, which seems a bit odd No idea what, if anything, you can do about that... or why it seems you can *read* timestamps. – Alex Poole Aug 14 '17 at 15:38
  • That's interesting. – devoured elysium Aug 14 '17 at 19:20

0 Answers0