Adobe AIR SQLite ORM

by Alexis Hope,

A note from a series of posts on AIR and SQLite. At the time, I needed to put together an analytics tracking library for an AIR application — Google Analytics only supported Flex apps with DOM access, so it wasn’t available in AIR. That constraint pushed me toward building a custom persistence layer to buffer and batch events locally before syncing them upstream.

Wanting a cleaner approach to persistent data in AIR, I started writing my own DataObject class to handle saving and retrieving records. While writing it I assumed someone had already solved this problem — and sure enough, they had.

FlexORM

Mark Moloney wrote FlexORM, which generates SQLite tables from metadata annotations on ActionScript classes. Rather than writing CREATE TABLE statements manually, you annotate your data classes and the framework handles schema creation, query generation, and result mapping.

This was the pattern that ORMs like Hibernate had established in Java — declare your model, let the framework own the SQL. The same idea has carried forward into every major ORM since: ActiveRecord, TypeORM, Prisma, SQLAlchemy. The implementation language changes but the core contract doesn’t: map objects to tables, keep the SQL out of application logic.

Note: RIAForge was shut down after Adobe ended AIR support — the FlexORM link above is preserved for historical reference but is no longer active.

ColdFusion 9 + AIR ORM

Adobe’s ColdFusion 9 also shipped with AIR ORM support, which added something FlexORM didn’t have out of the box: bidirectional sync between a local SQLite database and a remote server. Local writes would queue up and sync when connectivity was available.

This was a meaningful capability in 2009–2011. Offline-first data handling was still largely unsolved in web and desktop apps, and AIR was one of the few platforms treating it as a first-class concern.

The concept didn’t go away — it just moved platforms. The same offline sync problem is now solved by service workers and IndexedDB in the browser, by Litestream and Turso’s embedded replicas for SQLite at the edge, and by CRDTs in distributed systems that need to reconcile concurrent local writes. The AIR implementation was limited in scope but it was pointing at a real and lasting problem.

Why This Still Matters

Two ideas from this era are worth carrying forward:

Schema-from-annotations is now the default expectation for ORMs. If you’re picking a data layer today, Prisma’s schema-first approach and TypeORM’s decorator-based mapping are direct descendants of what FlexORM was doing in ActionScript.

Offline-first sync is harder than it looks. The ColdFusion AIR ORM handled it simply because the conflict model was simple — server wins. Production sync in 2026 requires thinking about conflict resolution, vector clocks, and eventual consistency. But the instinct to queue local writes and sync asynchronously is exactly right, and worth understanding from first principles before reaching for a library that hides the complexity.

Tags: