zoukankan      html  css  js  c++  java
  • 关于spring data jpa的@query的传入参数是对象怎么匹配参数

    /**
     * Specifies methods used to obtain and modify person related information
     * which is stored in the database.
     * @author Petri Kainulainen
     */
    public interface PersonRepository extends JpaRepository<Person, Long> {
     
        /**
         * Finds a person by using the last name as a search criteria.
         * @param lastName
         * @return  A list of persons whose last name is an exact match with the given last name.
         *          If no persons is found, this method returns an empty list.
         */
        @Query("SELECT p FROM Person p WHERE LOWER(p.lastName) = LOWER(:lastName)")
        public List<Person> find(@Param("lastName") String lastName);
    }
    @Query("update HsAlbum album set album.albumName = :#{hsAlbum.albumName} ,album.description = :#{hsAlbum.description } ")
    public int update(HsAlbum hsAlbum);
  • 相关阅读:
    MATLAB accumarray
    函数rand,randn,randi
    bsxfun
    sub2ind函数
    MAX
    & 和 &&
    matlab函数int2str, num2str, str2num
    ASCII对照表
    STM32的ADC配置
    单节锂电池基本知识
  • 原文地址:https://www.cnblogs.com/nongzihong/p/10882427.html
Copyright © 2011-2022 走看看