Hi,

This can be if you change data from database (for example using SQL update)
after loading to Ignite cache.
Ignite does not load data if they had loaded already (idetificatin by key).

If you use setReadThrough and setWriteThrough, you need to modify data
through cache only.


junyoung.kang wrote
> I mistake.. Sorry.
> 
> my load() function is
> 
>     @Override
>     public TbCustomer load(Integer customerId) throws CacheLoaderException
> {
> 
>         System.out.println(">>>> load data key =" + customerId);
> 
>         try {
>             Connection connection = dataSource.getConnection();
> 
>             PreparedStatement st = connection.prepareStatement("select *
> from TB_CUSTOMER where CUSTOMER_ID=?");
>             st.setString(1, customerId.toString());
> 
>             ResultSet rs = st.executeQuery();
> 
>             return rs.next() ? new TbCustomer(rs.getInt(1),
> rs.getString("EXTRA_CUSTOMER_NAME"),
>                     rs.getString("MOBILE_PHONE"), rs.getString("EMAIL"),
> Integer.valueOf(rs.getString("DEL_FLAG"))) : null;
> 
>         } catch (SQLException e) {
>             e.printStackTrace();
>             throw new CacheLoaderException("Failed to load customer id ="
> + customerId, e);
>         }
>     }
> 
> 
> I retry to test.. I want to value through database.
> 
> In my case(don't get value in database), I execute sql query on this
> cache.. 
> 
> like this..
> 
>         String query = "select * from TbCustomer where delFlag=?";
>         System.out.println(query);
>         QueryCursor<List<?>> results = customerCache.query(new
> SqlFieldsQuery(query).setArgs(0));
>         Util.print("simple Query : select * from TbCustomer where
> delFlag=0 ", results.getAll());
> 
> In this case, I can't get value in all database.(database query result !=
> above sql result)
> 
> However, when I invoke get() method, I get a value(not existed cache and
> existed database)
> 
> Thank you to reply.





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-zeppelin-jdbc-connection-tp7898p8012.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to