You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Michael Ray Gentry (Jira)" <ji...@apache.org> on 2025/10/23 12:08:00 UTC
[jira] [Closed] (CAY-2889) Make subclassing a PK Generator easier
[ https://issues.apache.org/jira/browse/CAY-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Ray Gentry closed CAY-2889.
-----------------------------------
Resolution: Fixed
Fix merged to master on October 22, 2025.
> Make subclassing a PK Generator easier
> --------------------------------------
>
> Key: CAY-2889
> URL: https://issues.apache.org/jira/browse/CAY-2889
> Project: Cayenne
> Issue Type: Improvement
> Components: Core Library
> Reporter: Michael Ray Gentry
> Priority: Minor
> Fix For: Undefined future
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> The *{{MySQLPkGenerator}}* makes two *{{super}}* calls that make subclassing more difficult:
> # super.pkSelectString(entityName)
> # super.pkUpdateString(entityName)
> The *{{super.}}* prefix should be removed to make it easier to subclass *{{MySQLPkGenerator}}* since *{{pkSelectString}}* and *{{pkUpdateString}}* are only implemented in the superclass ({*}{{JdbcPkGenerator}}{*}) and will get called by default since *{{MySQLPkGenerator}}* lacks those methods, but if someone subclasses *{{MySQLPkGenerator}}* and adds *{{pkSelectString}}* and/or *{{pkUpdateString}}* then the custom subclass methods will handle that logic instead of *{{JdbcPkGenerator}}* once the *{{super.}}* prefix is removed.
> See the developer mailing list conversation started by Robert Decker on April 30, 2025.
> Additionally, check the other PK Generator classes to see if they suffer from this issue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)