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
I am using find(:all,:group=>'networkID',...) in several places and expecting that it returns all fields of the most recent (in the max(ID) sense) row for each distinct networkID. For some reason, this is working fine, at least with sqlLite, but I don't understand why since the corresponding query appears to be:
SELECT * FROM "device_configs" GROUP BY serialNumber ...
How does "SELECT *" work with GROUP BY? Need to check that this still works with mySQL...
Controller actions where this occurs: athome/index, config/active, lam/active. Also in the device_config model validation active_configs_are_unique.
The text was updated successfully, but these errors were encountered:
The active_configs_are_unique validation is working ok now that it uses an initial query to get the list of active serial numbers first. This could probably be refactorized but is not broken.
I am using find(:all,:group=>'networkID',...) in several places and expecting that it returns all fields of the most recent (in the max(ID) sense) row for each distinct networkID. For some reason, this is working fine, at least with sqlLite, but I don't understand why since the corresponding query appears to be:
SELECT * FROM "device_configs" GROUP BY serialNumber ...
How does "SELECT *" work with GROUP BY? Need to check that this still works with mySQL...
Controller actions where this occurs: athome/index, config/active, lam/active. Also in the device_config model validation active_configs_are_unique.
The text was updated successfully, but these errors were encountered: