Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EllementCollection mapping throws [EclipseLink-6157]
EllementCollection mapping throws [EclipseLink-6157] [message #1844022] Fri, 27 August 2021 15:35
Alfonso Luna is currently offline Alfonso LunaFriend
Messages: 14
Registered: March 2010
Junior Member
This mapping Entity-Basic used to work perfectly in older versions. But it throw exception after updating to latest versions of Eclipselink.

@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name="modulos_modelos_bases", joinColumns=@JoinColumn(name="modelo"))
@MapKeyJoinColumn(name="modulo", referencedColumnName="id")
protected Map<TipoModulo,Integer> modulos;

Now, I'm getting this exception in execution time:

[EL Warning]: 2021-08-27 17:16:17.13--ServerSession(220937316)--Exception [EclipseLink-6157] (Eclipse Persistence Services - 3.0.2-RC2.v202107120925): org.eclipse.persistence.exceptions.QueryException
Exception Description: Element [4] is being added to a map without a key.  This generally means the database does not hold a key that is expected.
Query: DataReadQuery(name="modulos" sql="SELECT t0.cantidad, t0.modulo FROM modulos_modelos_bases t0 WHERE (t0.modelo = ?)")

Its being working for years. Database hasnt being modified either.

Could this be a bug? Has the JPA implementation changed?

Thanks in advance

[Updated on: Fri, 27 August 2021 15:36]

Report message to a moderator

Previous Topic:Deadlock in cache under load
Next Topic:Metamodel class not found
Goto Forum:

Current Time: Thu May 30 07:14:59 GMT 2024

Powered by FUDForum. Page generated in 0.03079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top