colymba / silverstripe-restfulapi

SilverStripe RESTful API with a default JSON serializer.
BSD 3-Clause "New" or "Revised" License
64 stars 34 forks source link

Created, LastEdited never seem to be returned #83

Open MichaelJJames opened 7 years ago

MichaelJJames commented 7 years ago

Hi,

When getting a DataObject /api/view/ I don't seem to getting Created or LastEdited returned.

Thanks Michael

colymba commented 7 years ago

Hei! I might be wrong but am not sure SilverStripe include those with the normal DataObject::get call, I think they might be cleaned out of the result. But you could add them back in the after/beforeSerialize hooks.

MichaelJJames commented 6 years ago

Hi @colymba,

I think Silverstripe returns all fields on a DO::get ill try the afterSerialize to see if it gets returned.

Thanks Michael

colymba commented 6 years ago

@MichaelJJames let me know if you find something about those fixed_fields. But best I can recall this model just return what the ORM gives it.