zoukankan      html  css  js  c++  java
  • 有关springBoot-jpa详细介绍,包括数据库映射和命名查询法等

    在这里就推荐 原地址  ,可以访问这个链接有详细介绍。

    注意:如果是ssh框架做模糊查询的时候,最好是自己写HQL语句,要不然出不了数据,反正我试过了。

    ssh框架的HQL例子:

    @Query("SELECT it FROM magneto.Xmgl it WHERE it.ztId=?1 and it.listType=?2 and it.name like %?3% and it.projectCode like %?4%")
    Page<Xmgl> findAllByZtIdAndListTypeAndNameLikeAndProjectCodeLike(int ztId, ListType listType, String name, String projectCode, Pageable pageable);
    
    @Query("SELECT count(it.id) FROM magneto.Xmgl it WHERE it.ztId=?1 and it.listType=?2 and it.name like %?3% and it.projectCode like %?4%")
    long countByZtIdAndListTypeAndNameLikeAndProjectCodeLike(int ztId, ListType listType, String name, String projectCode);
  • 相关阅读:
    基于Twisted的简单聊天室
    小学题的python实现
    初识Go(8)
    初识Go(7)
    初识Go(6)
    初识Go(5)
    初识Go(4)
    初识Go(3)
    初识Go(2)
    初识Go(1)
  • 原文地址:https://www.cnblogs.com/pzw23/p/12058215.html
Copyright © 2011-2022 走看看