attach
Attaches the underlying Stormify instance to target so the target can use it for database operations without receiving it as an explicit parameter.
Works for any StormifyAware — entity / AutoTable subclasses and onl.ycode.stormify.biglist.PagedList instances. Returns target for fluent chaining.
// Manual stub — user knows the ID, lets Stormify lazy-load the rest
User user = stormify.attach(new User());
user.setId(42);
System.out.println(user.getName()); // triggers SELECT
// Paged list created elsewhere — attach before use (or rely on Stormify.defaultInstance)
PagedList<Company> list = stormify.attach(new PagedList<>(JvmClassMappingKt.getKotlinClass(Company.class)));
list.addFacet("name");Content copied to clipboard
For a paged list or query of this instance, pagedList and pagedQuery are shorter.