Hey
Was trying your set_callback example but I get an error:
class Ship(Model):
type = Field(set_callback=lambda x: "Firefly")
ship = Ship(type="firefly")
print ship.type
Traceback (most recent call last):
File "/Users/hugoleveille/Desktop/programming/db/entity.py", line 171, in <module>
ship = Ship(type="firefly")
File "/Users/hugoleveille/Desktop/programming/site-packages/mogo/model.py", line 162, in __init__
setattr(self, field, value)
File "/Users/hugoleveille/Desktop/programming/site-packages/mogo/field.py", line 106, in __set__
value = self._set_callback(instance, value)
TypeError: <lambda>() takes exactly 1 argument (2 given)
Anything missing from this example to make it works?
Thanks