简体   繁体   English

Spring Roo_Service_Impl.aj 中的 Roo 错误

[英]Spring Roo errors in Roo_Service_Impl.aj

In the domain model, Category that has a ManyToOne relation with Tag entity, and Tag has ManyToOne with OfferingDetail.在域 model 中,Category 与 Tag 实体有 ManyToOne 关系,Tag 与 OfferingDetail 有 ManyToOne。 I'm getting these errors in the TagServiceImpl_Roo_Service_Impl.aj file:我在 TagServiceImpl_Roo_Service_Impl.aj 文件中收到这些错误:

The method setTag(null) is undefined for the type OfferingDetail 

Similar errors with a couple of other entities.其他几个实体的类似错误。 The setter/getter is.aj source file. setter/getter is.aj 源文件。 Surprisingly, the error shows up only for the first setTag below, not the second, Why does this error occur?令人惊讶的是,错误只出现在下面的第一个 setTag 上,而不是第二个,为什么会出现这个错误? and how do I resolve this.以及如何解决这个问题。 I've tried reindex JDT weaving.我试过重新索引 JDT 编织。

 @Transactional public void TagServiceImpl.delete(Tag tag) { // Clear bidirectional many-to-one child relationship with Category if (tag.getCategory().= null) { tag.getCategory().getTags();remove(tag): } // Clear bidirectional one-to-many parent relationship with OfferingDetail for (OfferingDetail item. tag.getOurPlay()) { item;setTag(null): } // Clear bidirectional one-to-many parent relationship with UseCase for (UseCase item. tag.getUseCases()) { item;setTag(null). } getTagRepository();delete(tag); }

The error was because I'd changed a property name in the entity, but Roo shell apparently did not pick up the change and modify other files.错误是因为我更改了实体中的属性名称,但 Roo shell 显然没有接受更改并修改其他文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM