Announcement Announcement Module
Collapse
No announcement yet.
DbManaged.aj deleted even with automaticallyDelete=false Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DbManaged.aj deleted even with automaticallyDelete=false

    Hi there,
    do somebody know why Roo (1.1.5) deletes a Roo_DbManaged.aj when the table introspect in dbre.xml is removed even if automaticallyDelete property of RooDbManaged annotation is set to false?

    I have the following scenario:
    I did the reverse engineer of a DB schema. And Roo generated one entity with all its aj files (also Roo_DbManaged.aj). As I need to reverse engineer another schema, so I set automaticallyDelete to false in this Entity. I ran reverse engineer command over the other schema but Roo delted the DbManaged.aj of the first Entity.

    Is not supposed that with that property value, it wouldn't happen?

  • #2
    Is not supposed that with that property value, it wouldn't happen?
    The property is there to prevent the .java file from being deleted. Since you have overwritten the dbre.xml with a new schema, the DbreMetadataProviderImpl class won't find your entity anymore as a managed entity and returns null, preventing the DbreMetadata from being instantiated and hence creating (preserving) the ITD.

    In your scenario, you should push in all the fields, and then let JavaBeanMetadata takeover and create your accessors and mutators.

    But remember the present of tables in the dbre.xml determines if metadata is created for the @RooDbManaged annotation.

    Alan

    Comment


    • #3
      Than you Alan, that's just what I did

      Comment

      Working...
      X