Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using distinct with active objects

Edited

Hello,

We want to execute the belown SQL:

Employee[] eList = activeObject.find(Employee.class, Query.select("COUNTRY").distinct());

This results in an sql exception: 

org.h2.jdbc.JdbcSQLException: Data conversion error converting "France"

I guess the `select` argument has to be the `ID` field.

Is their a way to use `DISTINCT` with active objects, and ideally, retrieve only the specified column?

PS: We found these 2 issues that describe exactly the same problem we are encoutering, but we don't see any solution their although they are marked as resolved. Could we have more details about this.

https://ecosystem.atlassian.net/browse/AO-6

https://ecosystem.atlassian.net/browse/AO-3521

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,887 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you