Skip to content

Add managed ORM sessions and relationships to client and backend - #5885

Merged
shai-almog merged 41 commits into
masterfrom
orm-managed-relations
Sep 25, 2026
Merged

shai-almog merged 41 commits into
masterfrom
orm-managed-relations

Conversation

@shai-almog

@shai-almog shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

The existing ORM handles basic scalar CRUD but cannot manage an object graph as a unit of work. This change adds managed persistence to the client SQLite ORM and backend ORM through EntityManager.openSession(), with matching CN1 APIs and build-time metadata on both runtimes.

  • Add session identity, dirty checking, transactional flush, merge/refresh/detach, eager and lazy associations, cascades, orphan removal, optimistic version checks, backend pessimistic row locks, atomic increments, relation counts, and generated identifiers.

  • Add composite and embedded IDs, embedded values, mapped superclasses, single-table polymorphic inheritance, converters, lifecycle callbacks, ordered lists, entity maps, and scalar element collections.

  • Add relationship-aware builder queries and a documented JPQL subset with joins, projections, aggregates, subqueries, and bulk mutations. Schema creation includes managed mappings and handwritten legacy definitions; validation checks mapped columns and keys.

  • Enhance public-field association access at build time, including dependency callers, without runtime proxies. Preserve newly compiled application classes when refreshing dependency overlays. Generated serializers reject unloaded associations.

  • Keep legacy scalar DAO behavior and give generated client DAOs a separate instance per manager. Document session usage, migration requirements, and supported boundaries in the developer guide.

  • Keep documented application contracts in com.codename1.orm.session; move generated metadata, enhancement hooks, SQL adapters, DAO factories, and execution classes under com.codename1.impl.orm. Place the 31 new mapping annotation types in com.codename1.annotations.db, preserving the existing annotation package names.

  • Preserve standard Javadoc fragments for documented method type parameters in the Hugo API pages. Repair the core test fixtures that leaked touch-device state and raced the Vault prompt latch.

Validation

Core compilation uses Java 8; tests were exercised on Java 8, 17, and 21. The standalone Hugo doclet uses Java 25.

  • Focused backend/client/plugin reactor: 127 tests, zero failures/errors, covering managed sessions, generated mappings and enhancement, public API boundaries, legacy integration, mapping, and binding.
  • Full backend suite: 130 tests, zero failures/errors, one external-database test skipped.
  • Full core suite on Java 21: 7,338 tests, zero failures/errors. The dialog/menu and Vault regression scenarios also pass on Java 8 and 17. The dialog-then-menu sequence reproduced the CI failure before the fixture repair.
  • Hugo doclet: 98 tests passed, including generic-method anchor coverage. The rendered website passes the unmodified API parity gate: 2,353 pages and 30,163 fragments, plus all internal API links and search-index targets. The standard Java 25 API documentation build and strict public ORM Javadoc checks also pass; internal implementation packages are excluded.
  • Backend sources compile against the ParparVM Java API. The managed ORM guide example compiles, and guide snippet validation passes.
  • Shared client/backend runtime and annotation sources match byte for byte; cast-semantics validation and git diff --check pass.

Local focused reactor runs used -Dmaven.antrun.skip=true; native API compilation was checked separately. This is compile validation, without translated executable or device validation. Hosted CI runs separately on the pushed commit.

Supported scope and remaining limits

This is a CN1 managed persistence API, with public-field mappings and a defined JPQL subset. Getter/setter mappings, property-backed associations, joined/table-per-class inheritance, embeddable element collections, independently stored entity-map keys, nested fetch graphs, and mixed entity/scalar projections remain unsupported. Some collection fetch patterns still use individual queries. Existing schemas require explicit migrations, including legacy client text-char columns when moving to managed numeric UTF-16 storage.

MySQL/MariaDB SQL paths are implemented but were not tested against a live server. Native-device execution also remains unverified.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 65ms / native 5ms = 13.0x speedup
SIMD float-mul (64K x300) java 63ms / native 4ms = 15.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 198.000 ms
Base64 CN1 decode 130.000 ms
Base64 SIMD encode 114.000 ms
Base64 encode ratio (SIMD/CN1) 0.576x (42.4% faster)
Base64 SIMD decode 98.000 ms
Base64 decode ratio (SIMD/CN1) 0.754x (24.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 10.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 71.000 ms
Image applyMask (SIMD on) 49.000 ms
Image applyMask ratio (SIMD on/off) 0.690x (31.0% faster)
Image modifyAlpha (SIMD off) 101.000 ms
Image modifyAlpha (SIMD on) 55.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.545x (45.5% faster)
Image modifyAlpha removeColor (SIMD off) 71.000 ms
Image modifyAlpha removeColor (SIMD on) 29.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.408x (59.2% faster)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 63ms / native 4ms = 15.7x speedup
SIMD float-mul (64K x300) java 63ms / native 4ms = 15.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 196.000 ms
Base64 CN1 decode 135.000 ms
Base64 SIMD encode 102.000 ms
Base64 encode ratio (SIMD/CN1) 0.520x (48.0% faster)
Base64 SIMD decode 100.000 ms
Base64 decode ratio (SIMD/CN1) 0.741x (25.9% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 31.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.097x (90.3% faster)
Image applyMask (SIMD off) 31.000 ms
Image applyMask (SIMD on) 29.000 ms
Image applyMask ratio (SIMD on/off) 0.935x (6.5% faster)
Image modifyAlpha (SIMD off) 53.000 ms
Image modifyAlpha (SIMD on) 22.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.415x (58.5% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 23.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.742x (25.8% faster)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD float-mul (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 250.000 ms
Base64 CN1 decode 129.000 ms
Base64 SIMD encode 65.000 ms
Base64 encode ratio (SIMD/CN1) 0.260x (74.0% faster)
Base64 SIMD decode 59.000 ms
Base64 decode ratio (SIMD/CN1) 0.457x (54.3% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.429x (57.1% faster)
Image applyMask (SIMD off) 24.000 ms
Image applyMask (SIMD on) 18.000 ms
Image applyMask ratio (SIMD on/off) 0.750x (25.0% faster)
Image modifyAlpha (SIMD off) 16.000 ms
Image modifyAlpha (SIMD on) 46.000 ms
Image modifyAlpha ratio (SIMD on/off) 2.875x (187.5% slower)
Image modifyAlpha removeColor (SIMD off) 18.000 ms
Image modifyAlpha removeColor (SIMD on) 11.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.611x (38.9% faster)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 matched.
✅ JavaScript-port screenshot tests passed.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 712 total, 0 failed, 57 skipped

Benchmark Results

  • Execution Time: 19157 ms

  • Hotspots (Top 20 sampled methods):

    • 8.98% java.util.ArrayList.indexOf (143 samples)
    • 5.71% java.lang.StringBuilder.append (91 samples)
    • 5.65% com.codename1.tools.translator.BytecodeMethod.equals (90 samples)
    • 5.46% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (87 samples)
    • 4.46% java.util.HashMap.hash (71 samples)
    • 2.95% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (47 samples)
    • 2.95% com.codename1.tools.translator.BytecodeMethod.optimize (47 samples)
    • 2.70% com.codename1.tools.translator.Parser.cn1EnsureSubclassIndex (43 samples)
    • 2.39% java.lang.System.identityHashCode (38 samples)
    • 2.32% org.objectweb.asm.tree.analysis.Analyzer.analyze (37 samples)
    • 1.76% java.lang.String.equals (28 samples)
    • 1.51% java.io.FileOutputStream.open0 (24 samples)
    • 1.38% java.io.FileOutputStream.writeBytes (22 samples)
    • 1.32% java.lang.StringCoding.encode (21 samples)
    • 1.26% org.objectweb.asm.ClassReader.readCode (20 samples)
    • 1.19% com.codename1.tools.translator.NativeSymbolIndex.<init> (19 samples)
    • 1.07% java.lang.StringBuilder.toString (17 samples)
    • 1.07% java.util.IdentityHashMap$KeySet.toArray (17 samples)
    • 1.00% org.objectweb.asm.tree.analysis.Analyzer.findSubroutine (16 samples)
    • 1.00% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (16 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 157 screenshots: 157 matched.

Native Android coverage

  • 📊 Line coverage: 9.37% (9331/99611 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.10% (47834/525841), branch 3.60% (1793/49819), complexity 3.57% (1898/53096), method 5.52% (1542/27918), class 11.04% (413/3742)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 9.37% (9331/99611 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.10% (47834/525841), branch 3.60% (1793/49819), complexity 3.57% (1898/53096), method 5.52% (1542/27918), class 11.04% (413/3742)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 107ms / native 71ms = 1.5x speedup
SIMD float-mul (64K x300) java 111ms / native 46ms = 2.4x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 59.000 ms
Base64 CN1 decode 69.000 ms
Base64 native encode 321.000 ms
Base64 encode ratio (CN1/native) 0.184x (81.6% faster)
Base64 native decode 248.000 ms
Base64 decode ratio (CN1/native) 0.278x (72.2% faster)
Image encode benchmark status skipped (SIMD unsupported)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 223 screenshots: 223 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 244 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 64ms / native 3ms = 21.3x speedup
SIMD float-mul (64K x300) java 66ms / native 3ms = 22.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 161.000 ms
Base64 CN1 decode 113.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.143x (85.7% faster)
Image applyMask (SIMD off) 41.000 ms
Image applyMask (SIMD on) 50.000 ms
Image applyMask ratio (SIMD on/off) 1.220x (22.0% slower)
Image modifyAlpha (SIMD off) 47.000 ms
Image modifyAlpha (SIMD on) 33.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.702x (29.8% faster)
Image modifyAlpha removeColor (SIMD off) 36.000 ms
Image modifyAlpha removeColor (SIMD on) 33.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.917x (8.3% faster)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 150 screenshots: 150 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 155 screenshots: 155 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 1162 seconds

Build and Run Timing

Metric Duration
Simulator Boot 109000 ms
Simulator Boot (Run) 1000 ms
App Install 14000 ms
App Launch 1000 ms
Test Execution 388000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 74ms / native 4ms = 18.5x speedup
SIMD float-mul (64K x300) java 56ms / native 3ms = 18.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 310.000 ms
Base64 CN1 decode 113.000 ms
Base64 native encode 533.000 ms
Base64 encode ratio (CN1/native) 0.582x (41.8% faster)
Base64 native decode 629.000 ms
Base64 decode ratio (CN1/native) 0.180x (82.0% faster)
Base64 SIMD encode 55.000 ms
Base64 encode ratio (SIMD/CN1) 0.177x (82.3% faster)
Base64 SIMD decode 52.000 ms
Base64 decode ratio (SIMD/CN1) 0.460x (54.0% faster)
Base64 encode ratio (SIMD/native) 0.103x (89.7% faster)
Base64 decode ratio (SIMD/native) 0.083x (91.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 22.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.091x (90.9% faster)
Image applyMask (SIMD off) 282.000 ms
Image applyMask (SIMD on) 118.000 ms
Image applyMask ratio (SIMD on/off) 0.418x (58.2% faster)
Image modifyAlpha (SIMD off) 276.000 ms
Image modifyAlpha (SIMD on) 230.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.833x (16.7% faster)
Image modifyAlpha removeColor (SIMD off) 125.000 ms
Image modifyAlpha removeColor (SIMD on) 352.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 2.816x (181.6% slower)

@shai-almog

shai-almog commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 154 screenshots: 154 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 340 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 67ms / native 3ms = 22.3x speedup
SIMD float-mul (64K x300) java 65ms / native 2ms = 32.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 185.000 ms
Base64 CN1 decode 98.000 ms
Base64 native encode 867.000 ms
Base64 encode ratio (CN1/native) 0.213x (78.7% faster)
Base64 native decode 355.000 ms
Base64 decode ratio (CN1/native) 0.276x (72.4% faster)
Base64 SIMD encode 59.000 ms
Base64 encode ratio (SIMD/CN1) 0.319x (68.1% faster)
Base64 SIMD decode 64.000 ms
Base64 decode ratio (SIMD/CN1) 0.653x (34.7% faster)
Base64 encode ratio (SIMD/native) 0.068x (93.2% faster)
Base64 decode ratio (SIMD/native) 0.180x (82.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 10.000 ms
Image createMask (SIMD on) 5.000 ms
Image createMask ratio (SIMD on/off) 0.500x (50.0% faster)
Image applyMask (SIMD off) 63.000 ms
Image applyMask (SIMD on) 37.000 ms
Image applyMask ratio (SIMD on/off) 0.587x (41.3% faster)
Image modifyAlpha (SIMD off) 34.000 ms
Image modifyAlpha (SIMD on) 23.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.676x (32.4% faster)
Image modifyAlpha removeColor (SIMD off) 28.000 ms
Image modifyAlpha removeColor (SIMD on) 24.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.857x (14.3% faster)

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61c0ce97e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread vm/backend/src/com/codename1/impl/orm/BackendSqlAccess.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java Outdated
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T05:31:00.785536Z 4117450 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebf3bb442c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea81ddf795

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94c8deb6b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/QueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be329a2a4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7be9d1ce88

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75701f0f1b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a347472322

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/QueryImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3934a43576

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread vm/backend/src/com/codename1/backend/Database.java
Comment thread CodenameOne/src/com/codename1/impl/orm/JpqlQueryImpl.java Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdb89f5aa0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/QueryImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java Outdated
Comment thread CodenameOne/src/com/codename1/impl/orm/SessionImpl.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4117450402

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

check();
EntityModel owner = model(entity.getClass());
Relationship relation = owner.relationships()[owner.relationIndex(field)];
autoFlush();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate relationship-count identifiers before flushing

When count() receives a detached owner with a null, incomplete, or otherwise invalid persisted identifier, this call flushes every pending managed change before owner.keyValues(id) rejects the request. That can execute writes and lifecycle callbacks—or mark the transaction rollback-only because of an unrelated pending failure—even though the requested count was invalid; resolve and validate the identifier before calling autoFlush() in both runtime copies.

Useful? React with 👍 / 👎.

Comment on lines +733 to +735
Entry entry = entries.get(entity);
if (entry == null) {
throw new PersistenceException("remove requires a managed entity");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve detached targets while collecting removal cascades

When a managed owner points to a detached target with a complete identifier, normal flush validation explicitly accepts that relationship, but removing the owner through a CascadeType.REMOVE or orphan-removal association reaches this lookup and rejects the target solely because the exact object is absent from entries. This also prevents canceling a fresh owner when its REMOVE-only child is transient. Resolve persisted cascade targets by identifier (and ignore unsaved targets whose owning insert is being canceled) rather than requiring every referenced object to already be managed.

Useful? React with 👍 / 👎.

@shai-almog
shai-almog merged commit 1ae0cf3 into master Sep 25, 2026
77 of 78 checks passed
@shai-almog
shai-almog deleted the orm-managed-relations branch September 25, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants