我在Mysql sensorlist和sensor_tags中有两个表,Sensorlist将激活传感器的寄存器(传感器的数据和slID来识别传感器).并且Sensor_tags将具有所有传感器的标签(来自传感器激活或未激活).此外,sensorlist可能在Sensor_tags表中未声明标记(或slId).我试图找到一个未在sensor_tag表中声明的传感器标签.我正在使用netbeans的Web服务,并始终得到错误:
Advertencia: EJB5184:A system exception occurred during an invocation on EJB SensorlistFacadeREST, method: public java.util.List entities.service.SensorlistFacadeREST.createSensorList()
Advertencia: javax.ejb.EJBException
Caused by: Exception [EclipseLink-6076] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.QueryException
Exception Description: Object comparisons can only be used with OneToOneMappings. Other mapping comparisons must be done through query keys or direct attribute level comparisons.
Mapping: [org.eclipse.persistence.mappings.DirectToFieldMapping[slId-->sensorlist.slId]]
Expression: [
Query Key slId
Base entities.Sensorlist]
Query: ReportQuery(name="Sensorlist.CreateSensorList" referenceClass=Sensorlist jpql="SELECT sl.slId, sl.slName1, sl.slName2, sl.slName3, sl.slInsertTimestamp, sl.slGMTOffset, sl.slActualTimestamp, sl.slActualValue, sl.slActualStatus FROM Sensorlist sl LEFT OUTER …Run Code Online (Sandbox Code Playgroud)