Skip to content

v1.0.0-alpha04

Pre-release
Pre-release

Choose a tag to compare

@sufarook sufarook released this 11 Aug 12:08
· 2 commits to main since this release
87f84db

The first release to include composite primary keys and @Relation on junction tables — plus a substantial reliability pass (cross-platform testing, binary-compatibility guarding) and the project's first LICENSE file.

plugins {
    id("io.github.sufarook.kiln") version "1.0.0-alpha04"
}

✨ New features

Composite primary keys
Annotate two or more properties with @PrimaryKey to form a composite key. Kiln generates an <Entity>Key data class and uses it wherever a single-key entity would use its key type:

@DbEntity(tableName = "assignments")
data class Assignment(
    @PrimaryKey val taskId: Long,
    @PrimaryKey val userId: Long,
    val assignedAt: String = ""
)

val key = AssignmentKey(taskId = 1, userId = 2)
assignmentRepo.findById(key)
assignmentRepo.delete(key)

@Relation on key columns — junction tables & shared-primary-key 1:1
A key column can now also be a foreign key. Add @Relation to composite-key columns and get the FK helpers on each:

@DbEntity(tableName = "task_tags")
data class TaskTag(
    @PrimaryKey @Relation val taskId: Long,
    @PrimaryKey @Relation val tagId: Long
)

taskTagRepo.findByTask(taskId = 1)    // every tag on a task
taskTagRepo.findByTag(tagId = 5)      // every task with a tag
taskTagRepo.deleteByTask(taskId = 1)

🛡️ Reliability

  • Binary compatibility validation now guards the public API of annotations and runtime (JVM, Android, and the iOS KLib ABI) — accidental breaking changes fail CI.
  • The SchemaMigrator / query DSL / transaction test suite now runs on a real iOS simulator (Kotlin/Native), not just the JVM — so migration and DSL behavior is verified on every published target. This also caught and fixed a real composite-key SQL bug in the migrator's table-rebuild path.
  • Quality gates added: ktlint formatting, Kover coverage reporting, and a Dokka API reference published alongside the docs.

📄 Docs & project

  • Added the Apache-2.0 LICENSE file — the repository previously had none despite every POM declaring it.
  • Corrected stale FAQ answers (transactions, foreign keys, pagination) that predated shipped features, and the @Relation(foreignKey=…) typo in the README (the parameter is cascade).
  • Brand identity on the docs site: logo, favicon, and violet palette.
  • Contributor scaffolding: CONTRIBUTING.md, issue/PR templates, branch protection.

📦 Maven coordinates

Artifact Coordinate
Plugin io.github.sufarook.kiln:1.0.0-alpha04
Annotations io.github.sufarook.kiln:annotations:1.0.0-alpha04
Runtime io.github.sufarook.kiln:runtime:1.0.0-alpha04
Processor io.github.sufarook.kiln:processor:1.0.0-alpha04

Upgrading

No breaking changes — everything is additive. Existing single-key entities are unaffected; composite keys and junction-table @Relation are new capabilities you opt into.

Full Changelog: v1.0.0-alpha03...v1.0.0-alpha04