Skip to content
Back to search

apache-cayenne

MarketplaceWorks with Claude CodeGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/apache/cayenne with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/apache/cayenne'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/apache--cayenne/badge.svg)](/listings/apache--cayenne)

HTML

<a href="/listings/apache--cayenne"><img src="/api/listings/apache--cayenne/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Create XML Mapping

Downloaded Cayenne Modeler from https://cayenne.apache.org/download/, start it and create a Cayenne project.

Include Cayenne in a Project

Maven

<dependencies>
    <dependency>
        <groupId>org.apache.cayenne</groupId>
        <artifactId>cayenne</artifactId>
        <version>5.0-M3</version>
    </dependency>
</dependencies>

Gradle

implementation 'org.apache.cayenne:cayenne:5.0-M3'

Create Cayenne Runtime

CayenneRuntime cayenneRuntime = CayenneRuntime.of()
    .addConfig("cayenne-demo.xml")
    .defaultDataNode(CayenneDataSource
             .of("jdbc:mysql://localhost:3306/cayenne_demo")
             .userName("username")
             .password("password")
             .build())
    .build();

Create New Objects

ObjectContext context = cayenneRuntime.newContext();

Artist picasso = context.newObject(Artist.class);
picasso.setName("Pablo Picasso");
picasso.setDateOfBirth(LocalDate.of(1881, 10, 25));

Gallery metropolitan = context.newObject(Gallery.class);
metropolitan.setName("Metropolitan Museum of Art");

Painting girl = context.newObject(Painting.class);
girl.setName("Girl Reading at a Table");

Painting stein = context.newObject(Painting.class);
stein.setName("Gertrude Stein");

picasso.addToPaintings(girl);
picasso.addToPaintings(stein);

girl.setGallery(metropolitan);
stein.setGallery(metropolitan);

context.commitChanges();

Queries

Select Objects

List<Painting> paintings = ObjectSelect.query(Painting.class)
        .where(Painting.ARTIST.dot(Artist.DATE_OF_BIRTH).year().lt(1900))
        .prefetch(Painting.ARTIST.joint())
        .select(context);

Exists Subqueries

long count = ObjectSelect.query(Artist.class)
    .where(Artist.PAINTING_ARRAY.dot(Painting.PAINTING_TITLE).like("painting%").exists())
    .selectCount(context);

Aggregate Functions

List<Object[]> artistAndPaintingCount = ObjectSelect
    .columnQuery(Artist.class, Artist.SELF, Artist.PAINTING_ARRAY.count())
    .where(Artist.ARTIST_NAME.like("a%"))
    .having(Artist.PAINTING_ARRAY.count().lt(5L))
    .orderBy(Artist.PAINTING_ARRAY.count().desc(), Artist.ARTIST_NAME.asc())
    .select(context);

for(Object[] next : artistAndPaintingCount) {
    Artist artist = (Artist)next[0];
    long paintingsCount = (Long)next[1];
    System.out.println(artist.getArtistName() + " has " + paintingsCount + " painting(s)");
}

Raw SQL Queries

// Selecting objects
List<Painting> paintings = SQLSelect
    .query(Painting.class, "SELECT * FROM PAINTING WHERE PAINTING_TITLE LIKE #bind($title)")
    .param("title", "painting%")
    .upperColumnNames()
    .localCache()
    .limit(100)
    .select(context);

// Selecting scalar values
List<String> paintingNames = SQLSelect
    .scalarQuery("SELECT PAINTING_TITLE FROM PAINTING WHERE ESTIMATED_PRICE > #bind($price)", String.class)
    .param("price", 100000)
    .select(context);

// Insert values
int inserted = SQLExec
    .query("INSERT INTO ARTIST (ARTIST_ID, ARTIST_NAME) VALUES (#bind($id), #bind($name))")
    .paramsArray(55, "Picasso")
    .update(context);

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 54 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "apache-cayenne",
  3. "metadata": {
  4. "description": "Apache Cayenne ORM Claude Code plugins"
  5. },
  6. "owner": {
  7. "name": "Apache Cayenne"
  8. },
  9. "plugins": [
  10. {
  11. "name": "apache-cayenne-6",
  12. "description": "Apache Cayenne 6.0 ORM — design DataMaps, reverse-engineer schemas, generate classes, write runtime code.",
  13. "author": {
  14. "name": "Apache Cayenne"
  15. },
  16. "source": {
  17. "source": "git-subdir",
  18. "url": "https://github.com/apache/cayenne.git",
  19. "path": "ai-plugin",
  20. "ref": "master"
  21. },
  22. "category": "development",
  23. "tags": [
  24. "java",
  25. "orm",
  26. "cayenne",
  27. "database"
  28. ]
  29. },
  30. {
  31. "name": "apache-cayenne-5",
  32. "description": "Apache Cayenne 5.0 ORM — the same skills for projects on the 5.0 release line.",
  33. "author": {
  34. "name": "Apache Cayenne"
  35. },
  36. "source": {
  37. "source": "git-subdir",
  38. "url": "https://github.com/apache/cayenne.git",
  39. "path": "ai-plugin",
  40. "ref": "STABLE-5.0"
  41. },
  42. "category": "development",
  43. "tags": [
  44. "java",
  45. "orm",
  46. "cayenne",
  47. "database"
  48. ]
  49. }
  50. ],
  51. "renames": {
  52. "apache-cayenne": "apache-cayenne-5"
  53. }
  54. }
README.md · README · 170 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one
  3. or more contributor license agreements. See the NOTICE file
  4. distributed with this work for additional information
  5. regarding copyright ownership. The ASF licenses this file
  6. to you under the Apache License, Version 2.0 (the
  7. "License"); you may not use this file except in compliance
  8. with the License. You may obtain a copy of the License at
  9. https://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing,
  11. software distributed under the License is distributed on an
  12. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. KIND, either express or implied. See the License for the
  14. specific language governing permissions and limitations
  15. under the License.
  16. -->
  17. # Apache Cayenne
  18. [![Maven Central](https://img.shields.io/maven-central/v/org.apache.cayenne/cayenne/5.0.svg)](https://cayenne.apache.org/download/)
  19. [![Build Status](https://github.com/apache/cayenne/actions/workflows/verify-deploy-on-push.yml/badge.svg?branch=master)](https://github.com/apache/cayenne/actions/workflows/verify-deploy-on-push.yml)
  20. [Apache Cayenne](https://cayenne.apache.org) is an open source persistence framework for Java. With a wealth of unique and powerful features, Cayenne can address a wide range of persistence needs. Cayenne seamlessly binds one or more database schemas to Java objects, managing atomic commits and rollbacks, SQL generation, joins, sequences, and more.
  21. Cayenne supports database reverse engineering and generation, as well as templated class generation. All of these functions can be controlled through the GUI CayenneModeler app. An entire database schema can be mapped directly to Java objects within minutes, all from the comfort of the GUI-based CayenneModeler.
  22. Cayenne supports numerous other features, including caching, an object query syntax, relationship pre-fetching, on-demand object and relationship faulting, object inheritance, database auto-detection, and generic persistent objects. Cayenne can scale up or down to virtually any project size.
  23. ## Quick Links
  24. * [Getting Started](https://cayenne.apache.org/docs/5.0/getting-started-guide/)
  25. * [Documentation](https://cayenne.apache.org/docs/5.0/cayenne-guide/)
  26. * [Upgrading from Older Cayenne](https://github.com/apache/cayenne/blob/master/UPGRADE.md)
  27. * [Bug/Feature Tracker](https://issues.apache.org/jira/browse/CAY)
  28. ## Quick Start
  29. ### Create XML Mapping
  30. Downloaded Cayenne Modeler from https://cayenne.apache.org/download/, start it and create a Cayenne project.
  31. ### Include Cayenne in a Project
  32. Maven
  33. ```xml
  34. <dependencies>
  35. <dependency>
  36. <groupId>org.apache.cayenne</groupId>
  37. <artifactId>cayenne</artifactId>
  38. <version>5.0-RC1</version>
  39. </dependency>
  40. </dependencies>
  41. ```
  42. Gradle
  43. ```gradle
  44. implementation 'org.apache.cayenne:cayenne:5.0-RC1'
  45. ```
  46. #### Create Cayenne Runtime
  47. ```java
  48. CayenneRuntime cayenneRuntime = CayenneRuntime.of()
  49. .addConfig("cayenne-demo.xml")
  50. .defaultDataNode(CayenneDataSource
  51. .of("jdbc:mysql://localhost:3306/cayenne_demo")
  52. .userName("username")
  53. .password("password")
  54. .build())
  55. .build();
  56. ```
  57. ### Create New Objects
  58. ```java
  59. ObjectContext context = cayenneRuntime.newContext();
  60. Artist picasso = context.newObject(Artist.class);
  61. picasso.setName("Pablo Picasso");
  62. picasso.setDateOfBirth(LocalDate.of(1881, 10, 25));
  63. Gallery metropolitan = context.newObject(Gallery.class);
  64. metropolitan.setName("Metropolitan Museum of Art");
  65. Painting girl = context.newObject(Painting.class);
  66. girl.setName("Girl Reading at a Table");
  67. Painting stein = context.newObject(Painting.class);
  68. stein.setName("Gertrude Stein");
  69. picasso.addToPaintings(girl);
  70. picasso.addToPaintings(stein);
  71. girl.setGallery(metropolitan);
  72. stein.setGallery(metropolitan);
  73. context.commitChanges();
  74. ```
  75. ### Queries
  76. #### Select Objects
  77. ```java
  78. List<Painting> paintings = ObjectSelect.query(Painting.class)
  79. .where(Painting.ARTIST.dot(Artist.DATE_OF_BIRTH).year().lt(1900))
  80. .prefetch(Painting.ARTIST.joint())
  81. .select(context);
  82. ```
  83. #### Exists Subqueries
  84. ```java
  85. long count = ObjectSelect.query(Artist.class)
  86. .where(Artist.PAINTING_ARRAY.dot(Painting.PAINTING_TITLE).like("painting%").exists())
  87. .selectCount(context);
  88. ```
  89. #### Aggregate Functions
  90. ```java
  91. List<Object[]> artistAndPaintingCount = ObjectSelect
  92. .columnQuery(Artist.class, Artist.SELF, Artist.PAINTING_ARRAY.count())
  93. .where(Artist.ARTIST_NAME.like("a%"))
  94. .having(Artist.PAINTING_ARRAY.count().lt(5L))
  95. .orderBy(Artist.PAINTING_ARRAY.count().desc(), Artist.ARTIST_NAME.asc())
  96. .select(context);
  97. for(Object[] next : artistAndPaintingCount) {
  98. Artist artist = (Artist)next[0];
  99. long paintingsCount = (Long)next[1];
  100. System.out.println(artist.getArtistName() + " has " + paintingsCount + " painting(s)");
  101. }
  102. ```
  103. #### Raw SQL Queries
  104. ```java
  105. // Selecting objects
  106. List<Painting> paintings = SQLSelect
  107. .query(Painting.class, "SELECT * FROM PAINTING WHERE PAINTING_TITLE LIKE #bind($title)")
  108. .param("title", "painting%")
  109. .upperColumnNames()
  110. .localCache()
  111. .limit(100)
  112. .select(context);
  113. // Selecting scalar values
  114. List<String> paintingNames = SQLSelect
  115. .scalarQuery("SELECT PAINTING_TITLE FROM PAINTING WHERE ESTIMATED_PRICE > #bind($price)", String.class)
  116. .param("price", 100000)
  117. .select(context);
  118. // Insert values
  119. int inserted = SQLExec
  120. .query("INSERT INTO ARTIST (ARTIST_ID, ARTIST_NAME) VALUES (#bind($id), #bind($name))")
  121. .paramsArray(55, "Picasso")
  122. .update(context);
  123. ```
  124. ## Collaboration and Support
  125. * [Mailing lists](https://cayenne.apache.org/mailing-lists.html)
  126. * [Support](https://cayenne.apache.org/support.html)
  127. * [Contributing](https://cayenne.apache.org/how-can-i-help.html)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.