JPA查询参数不起作用

时间:2015-12-28 09:39:43

标签: java spring jpa

@Query(value = "select count(t.userid) from semo_admin_user t where t.userid = :userId and t.userstatus = 1" , nativeQuery = true)
public  int getUserCount(@Param("userId") String userId);

我没有问题halttaeneun一个字符串使用。

 @Query(value = "insert into semo_admin_user(idx,username,userid,userpass,useremail,userstatus,usercreate)values(nextval('SEQ_SEMO_ADMIN_USER'),:username,:userid,;userpass,:useremail,1,:usercreate)", nativeQuery = true)
public  int insertUser(UserDomain userDto);

参数Map,Domain class它不可用 我应该如何处理这是每个ml

0 个答案:

没有答案