Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Fix: the encoding process is not respecting the Field.model property.
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmineo committed Jul 25, 2014
1 parent a6b9e7e commit 247822a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## v0.1.1
* Fix: the encoding process is not respecting the `Field.model` property.

## v0.1.0
* First release.
6 changes: 5 additions & 1 deletion lib/manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ mapper.FieldDecoder _fieldDecoder = (Object data, String fieldName,
mapper.FieldEncoder _fieldEncoder = (Map data, String fieldName,
mapper.Field fieldInfo,
List metadata, Object value) {
data[fieldName] = value;
String name = fieldInfo.model;
if (name == null) {
name = fieldName;
}
data[name] = value;
};

mapper.GenericTypeCodec _codec = new mapper.GenericTypeCodec(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: redstone_mapper_pg
version: 0.1.0
version: 0.1.1
author: Luiz Mineo <[email protected]>
description: PostgreSQL extension for redstone_mapper
homepage: http://redstonedart.org
Expand Down

0 comments on commit 247822a

Please sign in to comment.