File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
main/java/org/javalite/activejdbc
test/java/org/javalite/activejdbc Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -182,9 +182,9 @@ public <E extends Model> LazyList<E> include(Class<? extends Model>... classes)
182
182
*
183
183
* @return list of maps, where each map represents a row in the resultset keyed off column names.
184
184
*/
185
- public List <Map > toMaps (){
185
+ public List <Map < String , Object >> toMaps () {
186
186
hydrate ();
187
- List <Map > maps = new ArrayList <>(delegate .size ());
187
+ List <Map < String , Object > > maps = new ArrayList <>(delegate .size ());
188
188
for (T t : delegate ) {
189
189
maps .add (t .toMap ());
190
190
}
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ public void shouldBeAbleToIncludeParentOne2Many() {
49
49
public void shouldBeAbleToIncludeChildrenOne2Many () {
50
50
deleteAndPopulateTables ("users" , "addresses" );
51
51
LazyList <User > users = User .findAll ().orderBy ("id" ).include (Address .class );
52
- List <Map > maps = users .toMaps ();
52
+ List <Map < String , Object > > maps = users .toMaps ();
53
53
54
- Map user = maps .get (0 );
54
+ Map < String , Object > user = maps .get (0 );
55
55
a (user .get ("first_name" )).shouldBeEqual ("Marilyn" );
56
56
List <Map > addresses = (List <Map >)user .get ("addresses" );
57
57
a (addresses .size ()).shouldBeEqual (3 );
@@ -76,7 +76,7 @@ public void shouldBeAbleToIncludeOtherInManyToMany() {
76
76
the (patientList ).shouldBeTheSameAs (patientList1 );
77
77
the (patientList .get (0 )).shouldBeTheSameAs (patientList1 .get (0 ));
78
78
79
- List <Map > doctorsMaps = doctors .toMaps ();
79
+ List <Map < String , Object > > doctorsMaps = doctors .toMaps ();
80
80
81
81
List <Map > patients = (List <Map >)doctorsMaps .get (0 ).get ("patients" );
82
82
a (patients .size ()).shouldBeEqual (2 );
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ public void shouldBeAbleToIncludePolymorphicParent() {
156
156
157
157
final LazyList <Comment > comments = Comment .findAll ().orderBy ("id" ).include (Article .class , Post .class );
158
158
159
- final List <Map > commentMaps = comments .toMaps ();
159
+ final List <Map < String , Object > > commentMaps = comments .toMaps ();
160
160
161
161
final Map post = (Map ) commentMaps .get (0 ).get ("post" );
162
162
the (post .get ("id" )).shouldBeEqual (1 );
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public void shouldGenerateFromList(){
135
135
public void shouldConvertClobsToString (){
136
136
deleteAndPopulateTable ("articles" );
137
137
138
- List <Map > maps = Article .findAll ().toMaps ();
138
+ List <Map < String , Object > > maps = Article .findAll ().toMaps ();
139
139
a (maps .get (0 ).get ("content" )).shouldBeA (String .class );
140
140
}
141
141
You can’t perform that action at this time.
0 commit comments