ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murthy Kakarlamudi <ksa...@gmail.com>
Subject .NET SQLQuery Error
Date Sat, 09 Apr 2016 14:10:41 GMT
Hi All,
    I am running into below error trying to run SqlQuery in .NET.

Apache.Ignite.Core.Common.IgniteException was unhandled
  Message=Indexing is disabled for cache: BU. Use setIndexedTypes or
setTypeMetadata methods on CacheConfiguration to enable.

I am storing the entity created by Entity Framework in cache and trying to
query that POCO. Below are my Ignite config xml and the query I am using.

<property name="cacheConfiguration">
        <bean class="org.apache.ignite.configuration.CacheConfiguration">
          <property name="writeThrough" value="true"/>
          <property name="readThrough" value="true"/>
          <property name="writeBehindEnabled" value="true"/>
          <property name="writeBehindFlushFrequency" value="120000"/>
          <property name="cacheStoreFactory">
              <property name="typeName"
value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
          <property name ="typeMetadata">
              <bean class="org.apache.ignite.cache.CacheTypeMetadata">
                <!-- Type to query. -->
                <property name="valueType"
                <!-- Fields to be queried. -->
                <property name="queryFields">
                    <entry key="BUID" value="java.lang.Long"/>
                    <entry key="BUName" value="java.lang.String"/>
                    <entry key="CreatedByID" value="java.lang.Long"/>
                    <entry key="CreatedDate" value="java.util.Date"/>
                    <entry key="ModifiedByID" value="java.lang.Long"/>
                    <entry key="ModifiedDate" value="java.util.Date"/>
                <!-- Fields to index in ascending order. -->
                <property name="ascendingFields">
                    <entry key="BUID" value="java.lang.Long"/>

   using (var ignite = Ignition.Start(cfg))
                Console.WriteLine(">>> Cache query example started");
                var cache = ignite.GetCache<int, BusinessUnit>("BU");
                var qry = cache.Query(new
                foreach(var bu in qry)

Also, do I have to specify the column type classes in java(ex
java.lang.Long etc) in the config xml even if I am working in .NET world.
Or can I use .NET equivalent classes from the POCO that was generated from
Entity Framework?


View raw message