Results 1 to 5 of 5

Thread: @Version and @Id scanning

  1. #1
    Join Date
    Oct 2010
    Posts
    7

    Default @Version and @Id scanning

    How is exactly the scanning for @Version and @Id done.
    I have @MappedSuperclass that have @Version and @Id fields. This class is in separate module that is referenced as a dependency.

    I inherit from the @MappedSuperclass, but roo still tries to generate version and id fields.

    Note: If the entity that inherits from the @MappedSuperclass is in the same module/project, it works fine.

  2. #2
    Join Date
    Dec 2005
    Posts
    929

    Default

    Assuming you are using a multi-module project created by Roo, then the entities will need to be in the same domain module.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Oct 2010
    Posts
    7

    Default

    Yes, that obviously works, but what is the reason? Are only the Roo annotated superclasses scanned?
    This will explain it since the Roo annotations are with source retention.
    I'm having something like a framework library that will be used for different projects. I want to be able to extend certain domain objects from this framework, but obviously this is not working. I'm wondering if there is a way to do it and if there is a reason for not allowing it.

  4. #4
    Join Date
    Dec 2005
    Posts
    929

    Default

    Yes, that obviously works, but what is the reason?
    The multi-module Maven projects feature only supports this at present.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Oct 2010
    Posts
    7

    Default

    Thanks, I will try it, but anyway I don't think my use case fits into the multi-module schema. I want to use this library for different projects. I was planning to have it as a normal dependency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •