asmalindi
asmalindi

Reputation: 49

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)

Upvotes: 0

Views: 193

Answers (2)

chrismarx
chrismarx

Reputation: 12555

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-

Upvotes: 0

eruiz
eruiz

Reputation: 1973

It seems the referenced table isn't at transit schema.

Upvotes: 0

Related Questions