Files
hibernate-demo/docs/output/22-orderby-property-name.txt
T

6 lines
540 B
Plaintext

$ mvn -o -B test -Dtest=SortingTest#orderByUsesPropertyName_notColumnName
(trimmed to the generated SQL and the test's own RESULT line)
select s1_0.playlist_id,s1_0.id,s1_0.artist,s1_0.rating,s1_0.song_title from song s1_0 where s1_0.playlist_id=? order by s1_0.song_title
RESULT[sorting-orderby-property-name]: @OrderBy("title asc") on the songs collection, where the entity property is 'title' but the mapped column is 'song_title' -- loaded order: [Alpha, Mike, Zulu] -- Hibernate resolved the PROPERTY name to the right column itself.