Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-109

Add static protected entityManager() method to all entities with introduced EntityManager field

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.RC1
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      Writing custom finders is presently tedious because it requires instantiation of a new entity with the no-arg constructor and then performing a null check against the EntityManager field, to ensure it was injected (and thus a valid AJDT/AspectJ configuration has woven in Spring Aspects).

      It would improve usability if instead there was a "static protected EntityManager entityManager()" method added to each entity instead. This would allow hand-written code to acquire the EntityManager more easily.

      (Logged by Ben on behalf of Rod)

        Attachments

          Activity

            People

            Assignee:
            rod.johnson Rod Johnson
            Reporter:
            rod.johnson Rod Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: