SpringBoot 内连接?

问题描述

@Query(value="SELECT hotels.name,hotels.description,hotels.hotel_amenitities,room_type.type,hotels.room_amenitities,hotels.room_availability,hotels.room_price from hotels inner join room_type on hotels.type = room_type.id where hotels.name like %:hotelNames% and hotels.is_deleted = 'false'",nativeQuery = true)
Error : 2021-05-27 23:56:56.549 ERROR 28692 --- [nio-9000-exec-2] o.h.engine.jdbc.spi.sqlExceptionHelper   : Column 'id' not found.
Could not execute query; sql [SELECT hotels.name,hotels.room_price from hotels inner join room_type on hotels.type = room_type.id where hotels.name like ? and hotels.is_deleted = 'false']; nested exception is org.hibernate.exception.sqlGrammarException: Could not execute query

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)