for CALLABLE doesnt work cache

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

for CALLABLE doesnt work cache

Almir Abrarov
Hello!
How turn on cache for this Select

@Mapper
@Qualifier("BrandMapper")
public interface BrandMapper {
    @Select("{CALL #{out, jdbcType=CURSOR, javaType=java.sql.ResultSet, mode=OUT, resultMap=Brand} := pkg_Car.getBrand}")
   
@Options(statementType = StatementType.CALLABLE)

   
@Results(id = "Brand", value = {
           
@Result(property = "brandId", column = "car_brand_id"),
            @Result(property = "brandName", column = "car_brand_name"),
            @Result(property = "isForeign", column = "is_foreign"),
    })
    List<Brand> getAll();

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: for CALLABLE doesnt work cache

Guy Rouillier-2
See the Mapper Annotations section in the MyBatis User's Guide:

@Options(useCache=true)

This should be the default.

--
Guy Rouillier

------ Original Message ------
From: "Free_ware" <[hidden email]>
To: "mybatis-user" <[hidden email]>
Sent: 7/17/2018 3:35:34 PM
Subject: for CALLABLE doesnt work cache

Hello!
How turn on cache for this Select

@Mapper
@Qualifier("BrandMapper")
public interface BrandMapper {
    @Select("{CALL #{out, jdbcType=CURSOR, javaType=java.sql.ResultSet, mode=OUT, resultMap=Brand} := pkg_Car.getBrand}")
   
@Options(statementType = StatementType.CALLABLE)

   
@Results(id = "Brand", value = {
           
@Result(property = "brandId", column = "car_brand_id"),
            @Result(property = "brandName", column = "car_brand_name"),
            @Result(property = "isForeign", column = "is_foreign"),
    })
    List<Brand> getAll();

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: for CALLABLE doesnt work cache

Almir Abrarov
Yes, it is redundant 

среда, 18 июля 2018 г., 7:50:48 UTC+3 пользователь Guy Rouillier написал:
See the Mapper Annotations section in the MyBatis User's Guide:

@Options(useCache=true)

This should be the default.

--
Guy Rouillier

------ Original Message ------
From: "Free_ware" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="9gyECbAMBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">almir....@...>
To: "mybatis-user" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="9gyECbAMBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@...>
Sent: 7/17/2018 3:35:34 PM
Subject: for CALLABLE doesnt work cache

Hello!
How turn on cache for this Select

@Mapper
@Qualifier("BrandMapper")
public interface BrandMapper {
    @Select("{CALL #{out, jdbcType=CURSOR, javaType=java.sql.ResultSet, mode=OUT, resultMap=Brand} := pkg_Car.getBrand}")
   
@Options(statementType = StatementType.CALLABLE)

   
@Results(id = "Brand", value = {
           
@Result(property = "brandId", column = "car_brand_id"),
            @Result(property = "brandName", column = "car_brand_name"),
            @Result(property = "isForeign", column = "is_foreign"),
    })
    List<Brand> getAll();

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="9gyECbAMBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: for CALLABLE doesnt work cache

Almir Abrarov
In reply to this post by Almir Abrarov

maybe for CALLABLE cache doesn't work?

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.