Skip to content

Commit

Permalink
Merge pull request #8567 from Kris-LIBIS/8554-license-sorting-option2
Browse files Browse the repository at this point in the history
Fix sorting order of licenses by id with default license at the top
  • Loading branch information
kcondon authored Apr 8, 2022
2 parents 3669666 + 30f3b27 commit 1688a28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/edu/harvard/iq/dataverse/license/License.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
@NamedQueries({
@NamedQuery( name="License.findAll",
query="SELECT l FROM License l"),
query="SELECT l FROM License l ORDER BY (case when l.isDefault then 0 else 1 end), l.id asc"),
@NamedQuery( name="License.findAllActive",
query="SELECT l FROM License l WHERE l.active='true'"),
query="SELECT l FROM License l WHERE l.active='true' ORDER BY (case when l.isDefault then 0 else 1 end), l.id asc"),
@NamedQuery( name="License.findById",
query = "SELECT l FROM License l WHERE l.id=:id"),
@NamedQuery( name="License.findDefault",
Expand Down

0 comments on commit 1688a28

Please sign in to comment.