TABLE_PER_CLASS - Mapped Key Of A java.util.Map Does Not Work For Querying

(Doc ID 1489781.1)

Last updated on SEPTEMBER 11, 2012

Applies to:

Oracle TopLink - Version to [Release Oracle11g]
Information in this document applies to any platform.


There are three entities in an application: Domain, Element and DomainElement. The mapping is like the following:

public class DomainElement implements Serializable { ... }

When attempting to find / query for a Domain and fetch related DomainElement, the following occurs:
[EL Warning]: Exception [EclipseLink-6157] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.QueryException
Exception Description: Element [domain.DomainElement@1aacd5f] is being added to a map without a key. This generally means the database does not hold a key that is expected.


This is also documented at:
EclipseLink Bug 328774 - TABLE_PER_CLASS-mapped key of a java.util.Map does not work for querying


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms