Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8255821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:39:26+00:00 2026-06-08T01:39:26+00:00

We develop a Java EE application that uses a Postgres database as persistence medium.

  • 0

We develop a Java EE application that uses a Postgres database as persistence medium. Some of our entity attributes are mapped as float. Sorting this columns leads to the following result:

  SCORE
  1.0
  100.2
  2.0
  20.0
  3.0

The result I’ve expected is:

  SCORE
  1.0
  2.0
  3.0
  20.0
  100.2

The float attrributes are mapped with datatype float(8) in postgres database. With the following plain sql query sorting works as expected:

SELECT score FROM Evaluation ORDER BY score::float

Also changing the column type to “real” works. Is there any way (except using column definition) to get this work with jpa?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:39:28+00:00Added an answer on June 8, 2026 at 1:39 am

    Sorry for your effort :(. I had have a look again on the domain model. They saved the score within two columns. One column is float, the other is an varchar. Sorting action sorts the varchar column, so alphanumeric sorting is ok.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop a Java application with 4 tiers : database (MySQL), persistence (JPA), business
I want to develop a Java EE6 application that contains some Web-GUI functionality. Suppose
I have to develop a Java ME (formerly known as J2ME) application that will
When you develop a Java application that talks to oracle DBs, there are 2
For a Java application that drags data together from some sources and does some
I am planning to develop an java application,so i am in search of some
I have a java SE web application that is divided in layers. each database
I'm trying to develop a Java RMI application and found out that it's not
For my work I have to develop a small Java application that parses very
I am currently developing a debugger java application that uses JDI to connect to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.