hypolite (hypolite@friendica.mrpetovan.com)'s status on Tuesday, 27-Dec-2022 07:31:31 JST
-
Embed this notice
@heluecht The status values are Entity constants, the dismiss() method is an Entity method (don't forget to call Repository->save() after!). I want to avoid get* and set* methods in the Entity classes. Just create methods for the use-cases we have. Do we dismiss reports? dismiss(). Do we reopen them if they were dismissed? reopen().
Querying a list of reports based on conditions is in the Repository since it's interacting with the database. You can create a joined query, then use Factory->createFromTableRow to obtain Report entities, and you can use the rest of the row fields for what you want. Watch out for conflicting fields, the id field should always be the Entity ID.