Jacek Laskowski wrote:
On Fri, Jul 18, 2008 at 2:58 PM,  <[EMAIL PROTECTED]> wrote:
Author: rickmcguire
Date: Fri Jul 18 05:58:30 2008
New Revision: 677894

URL: http://svn.apache.org/viewvc?rev=677894&view=rev
Log:
OPENEJB-860 CMP 1.x beans with complex keys can generate an incorrect JPA 
mapping.


Modified:
   
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
...
+    private MappedSuperclass resolveIdClass(MappedSuperclass idclass, 
MappedSuperclass current, Class ejbClass)
+    {
+        // None identified yet?  Just use the one we just found
+        if (idclass == null) {
+            return current;
+        }
+
+        String idClassName = idclass.getClazz();
+        String currentClassName = idclass.getClazz();
+
+        // defined at the same level (common).  Just keep the same id class
+        if (idClassName.equals(currentClassName)) {
+            return idclass;
+        }

Is this correct? I think currectClassName should be current.getClazz()
as equals in the if statement will always evaluate to true.
D'oh!  Yes, you're correct.  Thanks for catching that.

Jacek


Reply via email to