Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-138

MergingPersistenceUnitManager doesnt work with Spring 3.1.0 DefaultPersistenceUnitManager

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.3, 1.1 RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Spring ORM 3.1.0.RELEASE

      Description

      The following check in DefaultPersistenceUnitManager of Spring ORM 3.1.0.RELEASE defeats the purpose of the merge using the same persistence unit name:

      String name = pui.getPersistenceUnitName();
      if (!this.persistenceUnitInfoNames.add(name)) {
      	StringBuilder msg = new StringBuilder();
      	msg.append("Conflicting persistence unit definitions for name '").append(name).append("': ");
      	msg.append(pui.getPersistenceUnitRootUrl()).append(", ");
      	msg.append(this.persistenceUnitInfos.get(name).getPersistenceUnitRootUrl());
      	throw new IllegalStateException(msg.toString());
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olivergierke Oliver Gierke
                Reporter:
                coldiges Christian Oldiges
                Last updater:
                Trevor Marshall
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: