silverstripe-restfulapi icon indicating copy to clipboard operation
silverstripe-restfulapi copied to clipboard

Created, LastEdited never seem to be returned

Open MichaelJJames opened this issue 6 years ago • 3 comments

Hi,

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

Thanks Michael

MichaelJJames avatar Nov 14 '17 12:11 MichaelJJames

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.

colymba avatar Nov 15 '17 16:11 colymba

Hi @colymba,

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

Thanks Michael

MichaelJJames avatar Dec 13 '17 13:12 MichaelJJames

@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.

colymba avatar Dec 13 '17 13:12 colymba