44import org .javawebstack .orm .query .Query ;
55import org .javawebstack .orm .test .exception .SectionIndexOutOfBoundException ;
66import org .javawebstack .orm .test .shared .models .Datatype ;
7+ import org .javawebstack .orm .test .shared .models .columnnames .OverwrittenColumnName ;
78import org .javawebstack .orm .test .shared .verification .QueryVerification ;
89import org .junit .jupiter .api .Test ;
910import java .util .*;
@@ -24,7 +25,9 @@ void testOneExistingColumnDefaultOrderBy() {
2425 void testOneNonExistingColumnDefaultOrderBy () {
2526 Query <Datatype > query = setUpModel (Datatype .class ).query ()
2627 .order ("doesNotExist" );
27- new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`does_not_exist`" );
28+
29+ // Not in snake case as it is not in the mapping
30+ new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`doesNotExist`" );
2831 }
2932
3033 @ Test
@@ -38,7 +41,9 @@ void testOneExistingColumnASCOrderBy() {
3841 void testOneNonExistingColumnASCOrderBy () {
3942 Query <Datatype > query = setUpModel (Datatype .class ).query ()
4043 .order ("doesNotExist" , false );
41- new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`does_not_exist`" );
44+
45+ // Not in snake case as it is not in the mapping
46+ new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`doesNotExist`" );
4247 }
4348
4449 @ Test
@@ -52,7 +57,8 @@ void testOneExistingColumnDESCOrderBy() {
5257 void testOneNonExistingColumnDESCOrderBy () {
5358 Query <Datatype > query = setUpModel (Datatype .class ).query ()
5459 .order ("doesNotExist" , true );
55- new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`does_not_exist` DESC" );
60+ // Not in snake case as it is not in the mapping
61+ new QueryVerification (query ).assertSectionEquals ("ORDER BY" , "`doesNotExist` DESC" );
5662 }
5763
5864 @ Test
0 commit comments