-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serializer doesn't serialize traits #638
Comments
what is the filed value when you get it using a getter? |
BTW, https://github.com/Atlantic18/DoctrineExtensions/blob/master/lib/Gedmo/Timestampable/Traits/TimestampableEntity.php already creates the $createdAt property. Can this block the "Timestampable" behavior? making it |
Ahhh, I just was missing an |
Yeah, but then I have no possibilities to serialize it via annotations. So I think, I have to override this field. |
I will just not use the trait :) |
Hmm....are there better ways without writing code? |
I mean, I will just copy/paste the content of the trait. Traits are just an "elegant" way of copy/paste Not easy Re-use is the drawback of annotations. |
Ok, thanks for your advice. |
Hey,
thanks for this awesome bundle.
I've noticed that serializer doesnt serialize traits. I've this is my entity:
When serializing this, I get
In the database the value of
created_at
field is2016-09-06 21:21:43
. Is there anything I'm doing wrong or is it just not possible?Best
Christian
The text was updated successfully, but these errors were encountered: