我有个menu表是一个树形菜单
public class Menu{
private int id;
private Menu parentMenu;
@Many(field="parentMenu",target=Menu.class)
private List<Menu> subMenu;
}
启动后 报错了
Caused by: org.nutz.dao.DaoException: host class=simple.system.simpleweb.module.menu.model.Menu, props=subMenus @Many(field="parentMenu",key="")) expect prop=parentMenu found at target class=simple.system.simpleweb.module.menu.model.Menu
at org.nutz.dao.impl.entity.field.ManyLinkField.<init>(ManyLinkField.java:41) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.entity.AnnotationEntityMaker.make(AnnotationEntityMaker.java:294) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.EntityHolder.getEntity(EntityHolder.java:72) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.entity.field.AbstractLinkField.getLinkedEntity(AbstractLinkField.java:72) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.entity.field.ManyLinkField.<init>(ManyLinkField.java:26) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.entity.AnnotationEntityMaker.make(AnnotationEntityMaker.java:294) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.EntityHolder.getEntity(EntityHolder.java:72) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.impl.NutDao.getEntity(NutDao.java:689) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.util.Daos$3.compare(Daos.java:533) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.util.Daos$3.compare(Daos.java:531) ~[nutz-1.r.67.jar:1.r.67]
at java.util.TimSort.countRunAndMakeAscending(Unknown Source) ~[na:1.8.0_77]
at java.util.TimSort.sort(Unknown Source) ~[na:1.8.0_77]
at java.util.Arrays.sort(Unknown Source) ~[na:1.8.0_77]
at java.util.ArrayList.sort(Unknown Source) ~[na:1.8.0_77]
at java.util.Collections.sort(Unknown Source) ~[na:1.8.0_77]
at org.nutz.dao.util.Daos.createTables(Daos.java:531) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.dao.util.Daos.createTablesInPackage(Daos.java:463) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.plugin.spring.boot.listener.NutzDataBaseIniter$1.invoke(NutzDataBaseIniter.java:39) ~[nutz-plugins-spring-boot-starter-1.r.67.jar:na]
at org.nutz.plugin.spring.boot.listener.NutzDataBaseIniter$1.invoke(NutzDataBaseIniter.java:35) ~[nutz-plugins-spring-boot-starter-1.r.67.jar:na]
at org.nutz.lang.Lang.each(Lang.java:1598) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.lang.Lang.each(Lang.java:1563) ~[nutz-1.r.67.jar:1.r.67]
at org.nutz.plugin.spring.boot.listener.NutzDataBaseIniter.create(NutzDataBaseIniter.java:35) ~[nutz-plugins-spring-boot-starter-1.r.67.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_77]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_77]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
... 18 common frames omitted