proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog6 min readintermediate

JPA Inspired ORM from SQLite to PostgreSQL

Summary

CodeName One introduced a JPA-inspired ORM layer, enabling shared entity definitions and managed sessions for both client (SQLite) and server (PostgreSQL, MySQL). This layer simplifies data persistence with relationship mappings, optimistic locking, and a JPQL-like query language.

  • A managed session tracks entity changes and coordinates persistence for a single unit of work.
  • Relationship mappings (@OneToMany, @ManyToOne) are supported, with explicit in-memory management.
  • Transactions are explicit, with beginTransaction(), commitTransaction(), and automatic rollback on session close.
  • Queries support eager/lazy loading via fetch() and a JPQL subset for complex operations.

Engineers building cross-platform applications with CodeName One can now use a consistent, JPA-inspired ORM for both client and server, simplifying data modeling and persistence logic across platforms.

6/10

Related reading

  1. One Java Model from the App to PostgreSQL

    Codename One introduces a backend runtime allowing a single Java model to define entities and validation rules for both client applications and the server. This approach aims to reduce duplication and ensure consistent data rules from the app to PostgreSQL.

    CodeName Onecodenameone.com7 min
  2. SQLite Across Every Port: One Contract, One Encrypted File Format

    Codename One now ships a single, tested SQLite contract that works natively on Android, iOS, Windows, Linux, and in browsers via WebAssembly, with built‑in SQLCipher‑4 encryption supporting three key models. A conformance suite guarantees identical behavior across platforms, and migration helpers let legacy apps opt‑in. The update also adds a proper watch‑app model, DOM‑based text for JavaScript,…

    CodeName Onecodenameone.com11 min
  3. SQL Manager for PostgreSQL 7.0: meet the AI Assistant

    SQL Manager for PostgreSQL 7.0 adds an AI Assistant that can generate, explain, fix, and optimize SQL, produce migration scripts from schema diffs or business requirements, and lets users control how much schema is sent to the model. It supports multiple LLM providers and local Ollama deployments.

    PostgreSQLpostgresql.org1 minrelease
  4. A practical guide to cost optimization with Lakebase Postgres

    Lakebase’s separated storage‑compute architecture lets you cut database costs by syncing only the active data, picking the right sync mode, and right‑sizing compute so the hot working set fits in cache. Follow the blog’s concrete steps—materialized‑view subsets, snapshot vs triggered vs continuous sync, autoscale bounds, and connection‑pooling—to keep spend predictable without sacrificing perform…

    Databricksdatabricks.com12 min
  5. Architecture of a Database System

    The paper surveys the internal architecture of modern relational DBMSs, describing the main components—client communications, process management, query processing, storage, and transaction management—and how they interact during a query lifecycle. It highlights design decisions such as admission control, buffer management, and concurrency control that are critical for scalability and reliability.

    Hall of Fameberkeley.edu161 minpaperHN31
  6. Build anything: Supabase from code, and an MCP server for your app

    Supabase announced new tools for agent-driven development, including native local Supabase instances, declarative schemas, and config-as-code. They also introduced Supabase Compute for long-running services and app-specific MCP servers for user agents to interact with applications.

    Supabasesupabase.com4 min