Blog

Mementifier v2.x Released!

Luis Majano February 13, 2020

Spread the word

Luis Majano

February 13, 2020

Spread the word


Share your thoughts

We are so excited to bring a major version release of our Mementifier Module. For those of you who do not know what Mementifier is, here is a small synopsis.

What is Mementifier?

This module will transform your business objects into native ColdFusion (CFML) data structures with :rocket speed. It will inject itself into ORM objects and/or business objects alike and give them a nice getMemento() function to transform their properties and relationships (state) into a consumable structure or array of structures. It can even detect ORM entities and you don't even have to write the default includes manually, it will auto-detect all properties. No more building transformations by hand! No more inconsistencies! No more repeating yourself! Best of all, it is lightning fast!

Defining Mementos

this.memento = {
	// An array of the properties/relationships to include by default
	defaultIncludes = [
		"firstName",
		"lastName",
		// Relationships
		"role.roleName",
		"role.roleID",
		"permissions",
		"children"
	],
	// An array of properties/relationships to exclude by default
	defaultExcludes = [],
	// An array of properties/relationships to NEVER include
	neverInclude = [ "password" ],
	// A struct of defaults for properties/relationships if they are null
	defaults = {
		"role" : {},
		"office" : {}
	},
	// A struct of mapping functions for properties/relationships that can transform them
	mappers = {}
}

Getting Mementos

struct function getMemento(
	includes="",
	excludes="",
	struct mappers={},
	struct defaults={},
	boolean ignoreDefaults=false
)

Release Notes

Here are the release notes for this major release:

Features

  • Enabled wildcard default includes (*) to retrieve inherited object properties instead of doing wacky things for inherited defaults to work.
  • New setting to chose a default value to expose when getters return null: nullDefaultValue
  • ORM Auto includes now ONLY includes properties to avoid bi-directional recursive exceptions. This is also a compatiblity, where before EVERYTHING was included. Now, only properties are included.

Improvements

  • Updated to cborm2 for testing harness
  • Updated to TestBox 3

Compatibility

  • Removed ACF 11 Support
  • ORM Auto includes only marshalls properties instead of everything.

Add Your Comment

Recent Entries

BoxLang Jsoup: Powerful HTML Parsing, Cleaning and Fluent Navigation

BoxLang Jsoup: Powerful HTML Parsing, Cleaning and Fluent Navigation

We're excited to announce the release of bx-jsoup, a powerful new BoxLang module that brings enterprise-grade HTML parsing and cleaning capabilities to your applications. Built on top of the proven Jsoup library, this module provides developers with safe, flexible tools for handling HTML content while maintaining BoxLang's signature ease of use. It also enhances the core document classes to provide you with a fluent BoxDocument result that you can navigate, query, and even convert your HTML representation to XML or JSON.

Luis Majano
Luis Majano
July 15, 2025
CBWire: Smarter UIs, Simpler Development!

CBWire: Smarter UIs, Simpler Development!

CBWire isn’t just a productivity boost, it’s a shift in how we think about building modern web apps in CFML. It empowers developers to create rich, responsive interfaces while keeping development clean, fast, and focused on what matters.

If you’re building ColdBox applications and want to streamline your front-end work, CBWire is one of the most impactful tools you can add to your stack.

Maria Jose Herrera
Maria Jose Herrera
July 14, 2025
Ortus Monthly Digest: June 2025

Ortus Monthly Digest: June 2025

June was a transformative month at Ortus Solutions as we crossed the halfway point of the year. With major product updates, powerful community engagements, and continued improvements across the BoxLang ecosystem, our mission to modernize development and empower engineers took center stage. Whether you're a longtime member of the Ortus community or just joining us, here's everything we accomplished in June packed with announcements, tools, and opportunities to grow.

Victor Campos
Victor Campos
July 08, 2025