Home Ebeans - trying to add an order by to a query
Reply: 0

Ebeans - trying to add an order by to a query

user816 Published in July 22, 2018, 8:35 pm

I am trying to add an orderBy to an Ebeans query, and I am somewhat unfamiliar with this ORM.

This is my query:

    List<UserOffer> userOffers = Ebean.find(UserOffer.class)
            .eq("user_id", userId)
            .eq("status_id", offerViewedStatus)

Everything worked (and was written by a developer more experienced with Ebeans than me) before adding the orderBy, but as soon as I do, the query stops working.

Is there some sort of syntax issue I am missing?

The UserOffer class is based on the user_offer table which has the column updated_at which is a timestamp with timezone field.

The backend is Postgres.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315427 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO