简体   繁体   中英

spring roo Error not annotated with @RooDbManaged

I am creating project with spring roo using exiting database. but database reverse engineer commond give me some error regards to one-to-many mapped-by field.

my spring roo command

database reverse engineer --schema transit --package ~.domain

 Created ROOT\src\main\resources\dbre.xml
 Updated ROOT\pom.xml
 Undo manage ROOT\src\main\resources\META-INF\persistence.xml
 Undo manage ROOT\pom.xml
 Undo create ROOT\src\main\resources\dbre.xm`
 Attempted to create one-to-many mapped-by field 'directionPlaces' in       '  lk.transit.web.admin.domain.Direction'  but type for table 'direction_place.no-schema- required' could not be found or is not database managed (not annotated with    @RooDbManaged)

似乎引用的表不在传输模式下。

This happened to me when I had manually created a class that had the same name as the table I was then trying to include in the dbre command. The funny thing was that I noticed the problem, removed the class, but roo still wouldn't execute the dbre command successfully until I quit the roo shell and started it up again-

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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