spring data jdbc use @query comments, How to match the parameters registered for entity

孤街浪徒 提交于 2021-02-05 06:35:09

问题


@Modifying
@Query(value = "update orders o set o.status =#{#order.status} ")
Integer updateOrder(@Param("order") Order order);

@Modifying
@Query(value = "update orders o set o.status = #{#order.status}")
Integer updateOrder(@Param("order") Order order);

I want to get the parameters of the order by means of order entity then update.


回答1:


This is part of SpEL support which isn't implemented yet.

There is an issue for this: DATAJDBC-397



来源:https://stackoverflow.com/questions/57040030/spring-data-jdbc-use-query-comments-how-to-match-the-parameters-registered-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!