How to search a field with custom setter and getter
How to search a field with custom setter and getter
SuperFashi
Posts: 1Questions: 1Answers: 0
I'm currently using Editor to process the table, and I encountered a problem.
I saved IP address in my database as INT UNSIGNED, and used getFormatter and setFormatter to convert IP addresses to and from INT UNSIGNED.
However, if I started searching an IP addresses, no result came up, which is pretty normal since the data are actually stored as integers.
But is there a way to search a field, like an IP address, in a way that it can convert and show the wanted result.
This discussion has been closed.
Answers
if you use server side processing you can only find the ip addresses if you enter them into the search field the way they are saved in the database (i.e. before getFormatting).
If you don't use server side processing (and mostly it isn't required) you should be able to find them in the format your getFormatter returns them.