[
https://issues.apache.org/jira/browse/CAMEL-24604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113988#comment-18113988
]
Claus Ibsen commented on CAMEL-24604:
-------------------------------------
Fixed on main via [PR #26074|https://github.com/apache/camel/pull/26074]
(CAMEL-24615), commit b512f58be29f8f090f75a77e5067a784b86dec9f, which carried
the CAMEL-24604 commit as its first commit.
[PR #26068|https://github.com/apache/camel/pull/26068] has been closed as
already merged.
_Claude Code on behalf of davsclaus_
> camel-jpa - KeyValueEntry cannot be mapped by Hibernate: isExpired() lacks
> @Transient
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-24604
> URL: https://issues.apache.org/jira/browse/CAMEL-24604
> Project: Camel
> Issue Type: Bug
> Components: camel-jpa
> Affects Versions: 4.23.0
> Reporter: Jiří Ondrušek
> Assignee: Jiří Ondrušek
> Priority: Major
> Fix For: 4.23.0
>
>
> KeyValueEntry (added by CAMEL-24463) uses property access, so the derived
> {{isExpired()}} getter is treated as a persistent property without a setter.
> Hibernate fails to build the SessionFactory:
> {noformat}
> org.hibernate.PropertyNotFoundException: Could not locate setter method for
> property 'expired'
> of class 'org.apache.camel.processor.keyvalue.jpa.KeyValueEntry'
> {noformat}
> Unnoticed because camel-jpa tests default to OpenJPA (lenient) and the
> hibernate profile never mapped the entity. On Quarkus every classpath @Entity
> is auto-discovered, so any application with camel-jpa + hibernate-orm fails
> to start (found via the Camel Quarkus nightly examples).
> Reproducer:
> https://github.com/JiriOndrusek/camel/tree/jpa-hibernate-reproducer
> {noformat}
> cd components/camel-jpa
> mvn clean test -Dtest=JpaKeyValueRepositoryTest -Dhibernate
> {noformat}
> All 23 tests fail with the exception above. Suggested fix: {{@Transient}} on
> {{isExpired()}} - with it the same 23 tests pass under both the hibernate and
> the default OpenJPA profile.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)