quarto
quarto copied to clipboard
NaiveDateTime querying
trafficstars
Hi @maartenvanvliet,
When trying to order with a join on a naive datetime field I get:
deps/quarto/lib/quarto/ecto/query.ex:100: value `{:created_at, ~N[2012-06-07 13:03:15]}` in `where` cannot be cast to type :naive_datetime in query:
Query looks like this:
where: s1.created_at < ^{:created_at, ~N[2012-06-07 13:03:15]} and ^true and ^true,
order_by: [desc: s1.created_at],
I also notice that you can't paginate on a query that has multiple of the same direction.
I.e. a asc on both created_at and id for example.
Could you create a failing test case for both issues?
@jnylen does this test cover the first case you described? https://github.com/fastjames/quarto/commit/3755a42234e18f720f0f6282a7382fa2e36f7405
It passes locally for me, so I think I am missing something about the expected setup.