Hi All,
I am upgrading Ignite from 2.10 to 2.16 and getting Multiple query fields
are associated with the same alias error for *EMPCode* and *EmpName, *which
is working with Ignite 2.10. unable to create Employee cache.
Error 1:
System.Exception: IgniteException for chache :: Employee
---> Apache.Ignite.Core.Cache.CacheException: class
org.apache.ignite.IgniteCheckedException: Multiple query fields are
associated with the same alias [alias=EMPNAME]
Error 2:
System.Exception: IgniteException for chache :: Employee
---> Apache.Ignite.Core.Cache.CacheException: class
org.apache.ignite.IgniteCheckedException: Multiple query fields are
associated with the same alias [alias=EMPCODE]
Error 2 can be corrected by removing TmcCode property but why same error
for EmpName?
my class file
Public class Employee: IBinarizable
{
[QuerySqlField]
public string EMPCode { get; set; }
[QuerySqlField]
public string EmpCode { get; set; }
[QuerySqlField]
public string EmpName { get; set; }
[QuerySqlField]
public EmpInfo EmpInformation { get; set; }
public void WriteBinary(IBinaryWriter writer)
{
if (writer != null)
{
writer.WriteString("empcode", EMPCode);
writer.WriteString("empname", EmpName );
writer.WriteObject(" empInformation", EmpInformation );
}
}
public void ReadBinary(IBinaryReader reader)
{
if (reader != null)
{
EMPCode = reader.ReadString("empcode");
EmpName = reader.ReadString("empname");
EmpInformation = reader.ReadString(" empInformation");
}
}
}
public class EmpInfo : IBinarizable
{
[QuerySqlField]
public string EmpName { get; set; }
[QuerySqlField]
public string EmpAddress{ get; set; }
public void WriteBinary(IBinaryWriter writer)
{
if (writer != null)
{
writer.WriteString(" empname ", EmpName );
writer.WriteString(" empaddress ", EmpAddress );
}
}
public void ReadBinary(IBinaryReader reader)
{
if (reader != null)
{
EmpName = reader.ReadString(" empname ");
EmpAddress = reader.ReadString(" empaddress ");
}
}
}
Thanks & Regards,
Charlin