Trying to retrieve single record using queryrunner

I’m trying to fetch a single record using queryrunner within a service. I’ve used queryrunner before but never to fetch only one record. I’ve tried tweaking the code to return a single Order object vs a List but no luck. Maybe my entire approach is wrong. It doesn’t even seem to be actually fetching the record. Thanks for any help.

public List getOrderByDMDNumber(Integer dmdNumber) {

    QueryRunner queryRunner = new QueryRunner(persistence.getDataSource());

    try {
        return queryRunner.query("SELECT * FROM imrkco5_dmdoffice.DMDOFFICE_ORDER WHERE dmd_number = ?",
                dmdNumber, new ResultSetHandler<List<Order>>() {
                    @Override
                    public List<Order> handle(ResultSet rs) throws SQLException {
                        ArrayList<Order> list = new ArrayList<>();
                        while (rs.next()) {
                            Order order = (Order) rs.getObject(1, Order.class);
                            //list.add((Order) rs.getObject(1));
                            list.add(order);
                        }
                        return list;
                    }
                });

    } catch (SQLException e) {
        throw new RuntimeException(e);
    }
}

}

Stack Trace:
ava.sql.SQLException: Conversion not supported for type com.murrayandjames.dmdoffice.entity.order.Order
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4654)

Hi,
QueryRunner doesn’t have capability to convert result set to the entity object.
If you want to take result as object, use instead EntityManager#createNativeQuery() method.

https://doc.cuba-platform.com/manual-7.2/nativeQuery.html

e.g.

TypedQuery<Customer> query = em.createNativeQuery(
    "select * from SALES_CUSTOMER where NAME like ?1",
    Customer.class);
query.setParameter(1, "%Company%");
List<Customer> list = query.getResultList();