You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if a custom user defined ordering function might be useful ? Concrete case: All my entities use a TimestampableTrait (very similar to the one provided by DoctrineExtensions), adding both createdAt and updatedAt fields. Those fields are declared with proper annotations in order to allow serialization. (VirtualProperty on a custom method or Expose directly on the trait properties).
As for readability, the traits use is declared at the top of my entities, without any defined order policy (ACCESSOR_ORDER_UNDEFINED), this results in the fact that created_at and updated_at fields are always before any other fields after serialization.
For this use case, the aim is to provide a way to use a custom ordering function, which will always put created_at and updated_at fields at the bottom.
I think there might be some other use cases.
What do you think ?
Note: I guess VirtualProperty are still ignored as mentioned in the #349. So, this will only work for properties for now.
The text was updated successfully, but these errors were encountered:
Hi there.
Many thanks for the amazing work on this library.
I wonder if a custom user defined ordering function might be useful ?
Concrete case: All my entities use a
TimestampableTrait
(very similar to the one provided byDoctrineExtensions
), adding bothcreatedAt
andupdatedAt
fields. Those fields are declared with proper annotations in order to allow serialization. (VirtualProperty
on a custom method orExpose
directly on the trait properties).As for readability, the traits use is declared at the top of my entities, without any defined order policy (
ACCESSOR_ORDER_UNDEFINED
), this results in the fact thatcreated_at
andupdated_at
fields are always before any other fields after serialization.For this use case, the aim is to provide a way to use a custom ordering function, which will always put
created_at
andupdated_at
fields at the bottom.I think there might be some other use cases.
What do you think ?
The text was updated successfully, but these errors were encountered: