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
Hi @brunonic
I was informed of your issue internally, thanks for taking the time to actually submit an issue here.
In the end, my first conclusion would be that the casting of the values only takes place when retrieving the values from the database.
Currently, we do listen for the flush event and act upon that and in that case, the cast didn't take place yet.
I will investigate this and see if we can better handle this to be more consistent.
A quick win for you would be to store your boolean values as integers (0/1) but that would force you to do the casting yourself when using the values each time unless you use non-strict equalities in your codebase.
Hey @brunonic , so the thing is that we send the entity in the state it is in just before being sent to the database. My guess is that your form actually sets 1 or 0 for the visibility property.
When re-indexing everything though, the results are being fetched from the database and casted to the correct type.
To enforce the boolean, here is what I suggest you add to your entity:
There is a difference between two case for a boolean value.
I have a simple symfony form for create and edit a BlogPost entity.
My form
My entity
And now this my index. On the top, the result of the index after form submit. On the bottom, the result after a algolia:reindex command.
Facet can't be used for visible:true
The text was updated successfully, but these errors were encountered: