mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#115 - Mapping - Add support for @ElementCollection enhancement
Add simple Map support with Json
This commit is contained in:
@@ -17,7 +17,7 @@ import java.util.Map.Entry;
|
||||
/**
|
||||
* Helper specifically for dealing with Maps.
|
||||
*/
|
||||
public final class BeanMapHelp<T> extends BaseCollectionHelp<T> {
|
||||
public class BeanMapHelp<T> extends BaseCollectionHelp<T> {
|
||||
|
||||
private final BeanPropertyAssocMany<T> many;
|
||||
private final BeanDescriptor<T> targetDescriptor;
|
||||
@@ -175,8 +175,7 @@ public final class BeanMapHelp<T> extends BaseCollectionHelp<T> {
|
||||
if (!map.isEmpty() || ctx.isIncludeEmpty()) {
|
||||
ctx.beginAssocMany(name);
|
||||
for (Entry<?, ?> entry : map.entrySet()) {
|
||||
//FIXME: json write map key ...
|
||||
targetDescriptor.jsonWrite(ctx, (EntityBean) entry.getValue());
|
||||
many.jsonWriteMapEntry(ctx, entry);
|
||||
}
|
||||
ctx.endAssocMany();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user