Community
Participate
Working Groups
Build Identifier: I-3.3.0-20110324075937 With our current implentation, the default name of join/referenced join column is null if embedded-id mapping is used; we should handle the case when the embedded id class (the embeddable) only has one attribute. The corresponding column name of the single attribute should be used as the default. Reproducible: Always
Seems this could result in invalid error messages and as such is a candidate for RC1.
This has a fairly simple workaround (specify join columns), so moving out of RC's and into maintenance.
I am curious how important of a case this is. The point of using an EmbeddedId is for composite primary keys. The spec does not support any defaults for the JoinColumns if there is a reference that has a composite primary key. EclipseLink *does* support defaults for this case (bug 325645). So, I guess I am wondering where in the spec or the JPA book is there an example where the EmbeddedId has only one attribute in the Embeddable and do we really need to spend the time to support that case? And if we do, is this appropriate for a maintenance release? I am thinking it might make more sense to do it along with bug 325645
When Nan and I were digging into what it would take to fix bug 325645, how we should handle an EmbeddedId/Embeddable with a single field presented itself as an obvious issue. If I remember correctly, possibly defaulting an Embeddable with a single column would be trivial alongside the changes necessary for bug 325645. So, I agree this bug should be fixed alongside the bug 325645, not now for a maintenance release. As to "What is the "right" thing to do with a single field EmbeddedId/Embeddable?", I don't know. But I don't think the spec disallows it. We could do whatever EclipseLink does, I guess.
I had a thought before that this case worked like a single primary key so we might handle it with the same way as we handle regular primary key, but it is more a special case of composite primary key so I agree that it makes more sense to fix it along with bug 325645.
Moving JPA specific bugs to new JPA component in bugzilla.
It seems we have decided to fix this along with bug 325645 and that is targeted to 3.2, targeting this to 3.2 as well
Same comment as before, targeting to 3.3 along with bug 235645