{
  "id": 12230587,
  "title": "JPA Inspired ORM from SQLite to PostgreSQL",
  "url": "https://urgent.news/2026/10/05/jpa-inspired-orm-from-sqlite-to-postgresql",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-05T21:11:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/codenameone/jpa-inspired-orm-from-sqlite-to-postgresql-15i9"
  },
  "original_language": "en",
  "account": "A new managed session feature in an ORM framework inspired by JPA simplifies working with databases in applications. Instead of remembering which DAO to call after every assignment, application code maintains relationships directly within the model. Loading data is streamlined, as loading twenty orders will no longer fetch each customer's entire history.\n\nDevelopers using the framework, Codename One, can build native apps for iOS, Android, desktop, and web from a single Java or Kotlin codebase. The ORM adds a managed session that tracks entities involved in a unit of work, detects changes, and coordinates persistence. Relationships are now an integral part of the model, with both client and backend using the same mapping annotations.\n\nThe framework supports SQLite, PostgreSQL, MySQL, and MariaDB databases. A customer and their orders are modeled using separate Java source files. The Customer class contains an id, version, name, and a list of orders. The Order class has an id, a Customer reference, and a totalCents value. The relationship between the two entities is established using mappedBy and OneToMany annotations.\n\nTo commit changes, the application code initiates a transaction, creates new entities, sets their properties, and adds them to the appropriate list. After committing the transaction, the changes are persisted in the database. The session, which belongs to a single thread and unit of work, manages the object graph without runtime reflection or proxy generation. This results in improved performance and easier code maintenance.",
  "summary": "Changing a customer's name should not require remembering which DAO to call after every assignment. Loading twenty orders should not accidentally fetch each customer's entire history. Those are the kinds of problems that appear once an application grows beyond a few independent tables. What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and…",
  "key_points": [
    "JPA-inspired ORM simplifies database interactions in applications",
    "Codename One framework supports SQLite, PostgreSQL, MySQL, MariaDB",
    "Managed session tracks entities, detects changes, coordinates persistence"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}