Skip to content

Commit

Permalink
new support for exporting the magic class parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 10, 2015
1 parent d27e7ed commit 7d4156d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/src/entity_manager/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,9 @@ def to_map(self, entity_class = None, depth = 0, special = True):
entity_class = entity_class or self.__class__

# in case the special flag is set the special attributes
# of the current instance should also be serialized
# of the current instance should also be serialized, so
# that even information like the class type is included
if special: map["_class"] = self.__class__.__name__
if special and hasattr(self, "mtime"): map["_mtime"] = self.mtime

# retrieves the id name and values and sets the id
Expand Down

0 comments on commit 7d4156d

Please sign in to comment.