Nov 10, 2018

Named parameters vs ordinal parameters in JPA

Named Parameters (:name) vs Ordinal Parameters (?index)

Besides the notation difference, named parameters and ordinal parameters are identical. Named parameters can provide added value to the clarity of the query string (assuming that meaningful names are selected). Therefore, they are preferred over ordinal parameters.