Description
Hello -
First off - huge thanks to you for maintaining this gem, Antonio. This gem has made life a lot easier for a project the team I'm a part of is working on.
What I'd like to know is what the plan is for for the sort and search column syntax moving forward. I know that the table_name.column_name
is already deprecated - but are you planning to remove it entirely in future versions?
I for one would not be in favor of fully removing it and I will likely have to fork updates if that happens.
I knew going into the newer version of this gem (0.3.0) that this functionality was deprecated, but we continue to use the table_name.column_name
functionality because ModelName.attribute will not work for us in one of our specific situations.
To be more specific, in our case - we don't use table_name.column name
- we actually use just column_name
because we're calling an alias.
Our query being made contains a database column alias we formed in the SELECT clause that we use to sort the columns in our DataTable.
We know that a column alias is "ugly" code and it's stepping outside of the model - which isn't a good practice typically. However, in this case, we are trying to sort on a piece of data that is more complex than a single column can typically contain - so it requires a nested sub-query inside an SQL column alias.
I know that this is a bit of an edge case, but I'm wondering if you might consider a configuration option where it would allow us to run in a legacy mode that would prevent these deprecation warnings from happening.
Or perhaps you might consider allowing the legacy column types (including aliases) to be in the column as an option, if configured ...
These are just thoughts. If there is a more elegant way to handle this edge case, I'm all ears.
We know that the functionality is deprecated, but in the case of needing to reference an alias to sort a column properly, there currently really isn't any other choice for us that I'm aware of.
Any insights or thoughts on this area would be appreciated. I've walked through part of this gem's code a few times to see what's happening, but I'm sure you have additional insights beyond what I can glean by reading through.
Thank you!