{"action":"closed","issue":{"url":"https://api.github.com/repos/marshmallow-code/marshmallow-sqlalchemy/issues/47","labels_url":"https://api.github.com/repos/marshmallow-code/marshmallow-sqlalchemy/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/marshmallow-code/marshmallow-sqlalchemy/issues/47/comments","events_url":"https://api.github.com/repos/marshmallow-code/marshmallow-sqlalchemy/issues/47/events","html_url":"https://github.com/marshmallow-code/marshmallow-sqlalchemy/issues/47","id":121315712,"number":47,"title":"schema.load is no longer taking into consideration the Models default values","user":{"login":"AdrielVelazquez","id":3443378,"avatar_url":"https://avatars.githubusercontent.com/u/3443378?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrielVelazquez","html_url":"https://github.com/AdrielVelazquez","followers_url":"https://api.github.com/users/AdrielVelazquez/followers","following_url":"https://api.github.com/users/AdrielVelazquez/following{/other_user}","gists_url":"https://api.github.com/users/AdrielVelazquez/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrielVelazquez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrielVelazquez/subscriptions","organizations_url":"https://api.github.com/users/AdrielVelazquez/orgs","repos_url":"https://api.github.com/users/AdrielVelazquez/repos","events_url":"https://api.github.com/users/AdrielVelazquez/events{/privacy}","received_events_url":"https://api.github.com/users/AdrielVelazquez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-09T19:01:07Z","updated_at":"2015-12-13T17:29:32Z","closed_at":"2015-12-13T17:29:32Z","body":"As of today 12/9 loading a dictionary to a model that has default fields is no longer using the alchemy default fields and throwing errors. \r\n\r\nExample below, Python 3\r\n\r\n```python\r\nfrom datetime import datetime\r\n\r\nfrom app import db\r\nfrom app.models.base import Base as SQLBASE\r\nfrom app.schemas import Base\r\n\r\n__all__ = [\"TestModel\"]\r\n\r\nclass TestModel(SQLBASE):\r\n    __tablename__ = 'test_table'\r\n    id = db.Column(db.Integer, primary_key=True)\r\n    name = db.Column(db.Unicode(255), nullable=False, unique=True)\r\n    created_at = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)\r\n    updated_at = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)\r\n\r\nclass TestModelSchema(Base):\r\n\r\n    class Meta(Base.Meta):\r\n        dateformat = \"%Y-%m-%d\"\r\n        model = TestModel\r\n\r\ntest_schema = TestModelSchema()\r\n\r\nclass TestSchemaFunctions:\r\n\r\n    def test_no_defaults(self):\r\n        dict_model = {\"name\": \"TestName\"}\r\n        results = test_schema.load(dict_model)\r\n        print(results.errors, results.data)\r\n        # (Pdb) results.errors\r\n        # {'updated_at': ['Missing data for required field.'], 'created_at': ['Missing data for required field.'], 'id': ['Missing data for required field.']}\r\n        # (Pdb) results.data\r\n        # {'name': 'TestName'}\r\n```"}}