Skip to content

NaiveDateTime querying #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jnylen opened this issue Nov 1, 2021 · 2 comments
Open

NaiveDateTime querying #56

jnylen opened this issue Nov 1, 2021 · 2 comments

Comments

@jnylen
Copy link

jnylen commented Nov 1, 2021

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.

@maartenvanvliet
Copy link
Owner

Could you create a failing test case for both issues?

@fastjames
Copy link
Contributor

@jnylen does this test cover the first case you described?
fastjames@3755a42

It passes locally for me, so I think I am missing something about the expected setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants