bx-orm-hibernate-bridge

Configure Hibernate tuplizers and proxies for BoxLang IClassRunnable entities.

2|Updated Apr 11, 2024
One-click install
npx skills add https://github.com/ortus-boxlang/bx-orm --skill bx-orm-hibernate-bridge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bx-orm-hibernate-bridge
Source: https://github.com/ortus-boxlang/bx-orm/tree/main/.agents/skills-custom/bx-orm-hibernate-bridge
Command: npx skills add https://github.com/ortus-boxlang/bx-orm --skill bx-orm-hibernate-bridge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the impedance mismatch between Hibernate's Java-centric entity lifecycle and BoxLang's dynamic IClassRunnable architecture, enabling seamless ORM integration.

Core Features & Use Cases

  • Custom Tuplizer Stack: Replaces Java-reflection-based operations with BoxLang-aware components for entity instantiation, property access, and lifecycle management.
  • Lazy Loading Support: Provides a specialized BoxProxy and BoxLazyInitializer to handle lazy association loading while maintaining IClassRunnable compatibility.
  • Use Case: When building a BoxLang application that requires complex database persistence, use this skill to configure the Hibernate bridge to treat your .bx or .cfc files as first-class ORM entities.

Quick Start

Use the bx-orm-hibernate-bridge skill to configure the EntityTuplizer and register the custom BoxLang-aware components within your Hibernate session factory.

Frequently Asked Questions about bx-orm-hibernate-bridge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Hibernate ORM with BoxLang components?

To use Hibernate with BoxLang, you need a bridge that replaces Java reflection with custom tuplizers, allowing dynamic IClassRunnable entities to integrate directly into the Hibernate lifecycle for seamless persistence.

How does lazy loading work for BoxLang ORM entities?

Lazy loading for BoxLang ORM uses a specialized BoxProxy and BoxLazyInitializer to handle association loading dynamically while maintaining IClassRunnable compatibility for your entities.

Can I map .bx or .cfc files as first-class Hibernate entities?

Yes, by configuring a custom EntityTuplizer and BoxClassInstantiator, you can treat your .bx or .cfc files as first-class Hibernate entities for complex database persistence.

What is the best way to resolve impedance mismatch between Hibernate and BoxLang?

The best way to resolve this mismatch is implementing a custom tuplizer stack that handles dynamic entity instantiation, property access, and lifecycle management specifically for BoxLang architecture.

Why does Hibernate fail to instantiate my BoxLang entities?

Hibernate fails because standard Java reflection cannot instantiate BoxLang's dynamic IClassRunnable architecture, requiring custom proxy factories and identifier normalization for proper serialization.