I have an AO entity with lifecycle info like 'created' (Timestamp type) and a data entity that extends it. I want to use AO to retrieve the data entities, ordered with most recent dates first. If I try the following:
Query query=Query.select().order("created"); MyObj = aoService.find(MyObj.class,query);
I get: ERROR: column "created" does not exist Position: 58 at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:251)
But, the table does have a Timestamp column, A bug possibly? Even if this worked, Im curious how I would indicate 'ascending' or 'descending' orders.
Anyone got an example to hand?
It looks like a case sensitivity issue to me. Some database are case sensitive, Postgres being one of them. And all table and column names converted by the AO plugin are upper case.
In your case I think simply changing your code to the following should work.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork? We've compiled a list here, along with...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs