Skip to content

Incorrect SQL generated with syntax error at the "order by" clause  #174

@rbygrave

Description

@rbygrave

As per discussion at https://groups.google.com/forum/#!topic/ebean/hDq2_oSZozA

The summary of the issue is that a query has both

  • a predicate on a path that goes from ManyToOne and OneToMany
  • an order by clause with the same ManyToOne

Note ManyToOne could also be a OneToOne.

Query<Paggview> query = Ebean.find(Paggview.class);
query.select("amount");
query.where().eq("pview.wviews", wview);
query.orderBy("pview.value");
query.findList();

In the query above "pview" is a OneToOne and "pview.wviews" is a OneToOne.OneToMany.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions