Hi Ilya,
Please find below config of cache with composite key:
<bean class="org.apache.ignite.configuration.CacheConfiguration"
parent="cache-template">
<property name="name" value="EntAssociatePositionCache" />
<property name="cacheMode" value="PARTITIONED" />
<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="statisticsEnabled" value="false"/>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType"
value="com.jio.digitalapi.edif.customer.model.EntAssociatePositionKey" />
<property name="valueType"
value="com.jio.digitalapi.edif.customer.model.EntAssociatePosition" />
<property name="tableName" value="ENT_ASSOCIATE_POSITION" />
<property name="keyFields">
<list>
<value>associateId</value>
<value>jobFunction</value>
</list>
</property>
<property name="fields">
<map>
<entry key="associateId" value="java.lang.String" />
<entry key="jobFunction" value="java.lang.String" />
<entry key="locationType" value="java.lang.String" />
<entry key="locationCode" value="java.lang.String" />
<entry key="storeCode" value="java.lang.String" />
<entry key="updateddatetime" value="java.sql.Timestamp"
/>
<entry key="updatedby" value="java.lang.String" />
</map>
</property>
<property name="aliases">
<map>
<entry key="associateId" value="ASSOCIATE_ID" />
<entry key="jobFunction" value="JOB_FUNCTION" />
<entry key="locationType" value="LOCATION_TYPE" />
<entry key="locationCode" value="LOCATION_CODE" />
<entry key="storeCode" value="STORE_CODE" />
</map>
</property>
<property name="indexes">
<list>
<bean class="org.apache.ignite.cache.QueryIndex">
<property name="name"
value="ENT_ASSOCIATE_POSITION_PK" />
<property name="indexType" value="SORTED" />
<property name="fields">
<map>
<entry key="associateId" value="false" />
<entry key="jobFunction" value="false" />
</map>
</property>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
Thanks and Regards,
Kamlesh Joshi
From: Ilya Kasnacheev [mailto:[email protected]]
Sent: Thursday, March 14, 2019 2:53 PM
To: [email protected]
Subject: Re: [External]Re: QueryEntities not returning all the fields available
in cache - 2.6 version
The e-mail below is from an external source. Please do not open attachments or
click links from an unknown or suspicious origin.
Hello!
Then mappingId is not a field. It is an SQL column but it's not a field.
If it happens with composite keys, please share config.
Regards,
--
Ilya Kasnacheev
чт, 14 мар. 2019 г. в 12:18,
<[email protected]<mailto:[email protected]>>:
Hi,
No, mappingId is not part of value object. But, even this issue is occurring
for other cache with composite key as well.
Thanks and Regards,
Kamlesh Joshi
From: Ilya Kasnacheev
[mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, March 13, 2019 6:16 PM
To: [email protected]<mailto:[email protected]>
Subject: [External]Re: QueryEntities not returning all the fields available in
cache - 2.6 version
The e-mail below is from an external source. Please do not open attachments or
click links from an unknown or suspicious origin.
Hello!
Do you have field mappingId in your value objects? Note that your key (which is
java.lang.String) is a different thing that mappingId in your value object,
since obviously you can make them diverge.
Regards,
--
Ilya Kasnacheev
пн, 11 мар. 2019 г. в 15:34,
<[email protected]<mailto:[email protected]>>:
Hi Igniters,
Am trying to retrieve Cache metadata i.e. its field name and
data type. But facing one weird issue, the metadata is returning valid response
for some caches and invalid for some. Am giving my cache configuration for
reference. The cluster is up and running for some time now, and we have not
altered/added any fields to any specific cache (aware about one existing issue
if you alter cache then its metadata is not updated and can’t be retrieved from
QueryEntities). Any help or pointers on this would be appreciated :
e.g. for below cache its returning only one field i.e. associateId. However, it
is supposed to return both the fields mentioned in ‘fields’ property below.
<bean class="org.apache.ignite.configuration.CacheConfiguration"
parent="cache-template">
<property name="name" value="EntMapAssociateCache" />
<property name="cacheMode" value="PARTITIONED" />
<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="statisticsEnabled" value="true"/>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType"
value="java.lang.String" />
<property name="valueType"
value="com.digitalapi.edif.customer.model.EntMapAssociate" />
<property name="tableName"
value="ENT_MAP_ASSOCIATE" />
<property name="keyFieldName" value="mappingId"
/>
<property name="keyFields">
<list>
<value>mappingId</value>
</list>
</property>
<property name="fields">
<map>
<entry
key="associateId" value="java.lang.String" />
<entry
key="mappingId" value="java.lang.String" />
</map>
</property>
<property name="aliases">
<map>
<entry
key="associateId" value="ASSOCIATE_ID" />
<entry
key="mappingId" value="MAPPING_ID" />
</map>
</property>
</bean>
</list>
</property>
</bean>
Thanks and Regards,
Kamlesh Joshi
"Confidentiality Warning: This message and any attachments are intended only
for the use of the intended recipient(s), are confidential and may be
privileged. If you are not the intended recipient, you are hereby notified that
any review, re-transmission, conversion to hard copy, copying, circulation or
other use of this message and any attachments is strictly prohibited. If you
are not the intended recipient, please notify the sender immediately by return
email and delete this message and any attachments from your system.
Virus Warning: Although the company has taken reasonable precautions to ensure
no viruses are present in this email. The company cannot accept responsibility
for any loss or damage arising from the use of this email or attachment."
"Confidentiality Warning: This message and any attachments are intended only
for the use of the intended recipient(s), are confidential and may be
privileged. If you are not the intended recipient, you are hereby notified that
any review, re-transmission, conversion to hard copy, copying, circulation or
other use of this message and any attachments is strictly prohibited. If you
are not the intended recipient, please notify the sender immediately by return
email and delete this message and any attachments from your system.
Virus Warning: Although the company has taken reasonable precautions to ensure
no viruses are present in this email. The company cannot accept responsibility
for any loss or damage arising from the use of this email or attachment."
"Confidentiality Warning: This message and any attachments are intended only
for the use of the intended recipient(s).
are confidential and may be privileged. If you are not the intended recipient.
you are hereby notified that any
review. re-transmission. conversion to hard copy. copying. circulation or other
use of this message and any attachments is
strictly prohibited. If you are not the intended recipient. please notify the
sender immediately by return email.
and delete this message and any attachments from your system.
Virus Warning: Although the company has taken reasonable precautions to ensure
no viruses are present in this email.
The company cannot accept responsibility for any loss or damage arising from
the use of this email or attachment."