There is no getter for property named 'GoodInformation' in 'class com.ruoyi.warehouse.domain.MaterialManagement'但是我已经写了public List<GoodInformation> getGoodInformation() { return GoodInformation; }
时间: 2024-04-15 19:28:30 浏览: 32
非常抱歉,我之前的回答可能有误导性。根据您提供的代码,确实已经在 `com.ruoyi.warehouse.domain.MaterialManagement` 类中定义了名为 `getGoodInformation()` 的 getter 方法。
在这种情况下,出现错误的原因可能是 MyBatis 在映射查询结果时出现了问题。请确保在 MyBatis 的映射文件中正确地配置了 `GoodInformation` 属性的映射。
在 MyBatis 的映射文件中,您需要使用 `<association>` 或 `<collection>` 元素来映射关联的对象或集合。以下是一个示例:
```xml
<resultMap id="materialManagementResultMap" type="com.ruoyi.warehouse.domain.MaterialManagement">
<id column="id" property="id" />
<!-- 其他属性映射 -->
<collection property="goodInformation" ofType="com.ruoyi.warehouse.domain.GoodInformation">
<id column="good_id" property="goodId" />
<!-- 其他属性映射 -->
</collection>
</resultMap>
```
在上述示例中,我们使用 `<collection>` 元素来映射 `goodInformation` 属性。确保您的映射文件中的配置与您的实际情况相匹配,并正确引用了属性和列名。
如果问题仍然存在,请提供更多关于您的代码和映射文件的细节,以便我能够更好地帮助您解决问题。
再次为之前的回答造成的困惑向您道歉。如果您还有其他问题,请随时提问。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)