Sometimes it is good to store form data in session – for example when working with filters, when you want to save last filters state when user gets back to page. But if your form has Entity type in choice field, you will see error like:
“Entity of type XXX passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?”
How to deal with this? Read below.Continue reading
Month: September 2020
Quick tip: How to sort array of objects by given property in custom order in Swift?
Imagine this, you have a class and enum like:
class UserDto { public var username: String public var userStatus: UserStatusDto } enum UserStatusDto: String { case ok = "Ok" case error = "Error" }
and you want to sort users by their status, but users with error first. How to do that? Continue reading