This commit is contained in:
Ziver Koc 2016-08-29 19:10:04 +02:00
parent 69544b4552
commit b6e902feb6
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ public class Event extends AbstractDevice<HalEventConfig,HalEventData>{
if (getId() != null) {
PreparedStatement stmt = db.getPreparedStatement(
"SELECT data FROM event_data_raw WHERE event_id == ? ORDER BY timestamp DESC LIMIT 1");
"SELECT * FROM event_data_raw WHERE event_id == ? ORDER BY timestamp DESC LIMIT 1");
stmt.setLong(1, getId());
return (HalEventData)
DBConnection.exec(stmt, new DeviceDataSqlResult(deviceDataClass));

View file

@ -123,7 +123,7 @@ public class Sensor extends AbstractDevice<HalSensorConfig,HalSensorData>{
if (getId() != null) {
PreparedStatement stmt = db.getPreparedStatement(
"SELECT data FROM sensor_data_raw WHERE sensor_id == ? ORDER BY timestamp DESC LIMIT 1");
"SELECT * FROM sensor_data_raw WHERE sensor_id == ? ORDER BY timestamp DESC LIMIT 1");
stmt.setLong(1, getId());
return (HalSensorData)
DBConnection.exec(stmt, new DeviceDataSqlResult(deviceDataClass));