Changelog History
Page 1
-
v0.16.3 Changes
June 12, 20202020-06-12
-
v0.16.2
March 18, 2020 -
v0.16.1
March 11, 2020 -
v0.16.0 Changes
March 11, 2020๐ New Features
- ๐ Multi-part form support using Pantry.
- โ Added few convenience session methods -
intended()
andpreviousUrl()
. These methods are also available on anHttpCall
object. - โ Added a new method,
inRandomOrder()
, for fetching entities in random order from a MySQL database. - โ Added
render()
andjson()
methods withArgsBuilder
as a lambda receiver. - โ Added
HttpCall.entityParam()
extension method that fetches an entity from a table by looking up anid
route param. - โ Added an API to register a custom view function as easily as adding a custom tags.
- โ Added a
spoof()
view function. (Resolves #27). - โ Added asynchronous support using
CompletableFuture
. - โ Added
intReference()
andlongReference()
as shortcuts for defining referencing columns.
๐ Improvements
- โก๏ธ Updated to Kotlin 1.3.70
๐ Bug Fixes
- ๐ Fixed #29 (Thanks @vanessagertman)
- ๐ Fixed #30
๐ฅ Breaking Changes
- โก๏ธ
useCurrent
attribute is set tofalse
for bothcreatedAt()
andupdatedAt()
.
-
v0.15.4
March 06, 2020 -
v0.15.3
March 06, 2020 -
v0.15.2
February 24, 2020 -
v0.15.1
February 20, 2020 -
v0.15.0 Changes
February 18, 2020๐ This release brings even more exciting features and improvements to Alpas. Here are the highlights:
๐ฑ ๐ New Features
โ๏ธ Resourceful Routes
You can create a resourceful routes for all the CRUD operations by using
resources()
method:
resources<PostController>("posts").name("posts")
โ๏ธ Auto Port Selection
๐ In dev mode Alpas automatically selects the next port if the selected port is in use already. Docs.
โ๏ธ Ozone Extensions
โก๏ธ Few useful methods and conventions are added in Ozone such as
findOrCreate(attrs)
,findOne(attrs)
,findMany()
,update(attrs)
,reference()
etc. Docs.โ๏ธ Column Binding Conventions
โก๏ธ Also added are four new column bindings -
createdAt()
,updatedAt()
,increments()
,bigIncrements()
.
๐ Docs.This means instead of this:
val id by bigInt("id").autoIncrement().unsigned().primaryKey().bindTo{ it.id }val createdAt by timestamp("created\_at").nullable().useCurrent().bindTo { it.createdAt }val updatedAt by timestamp("updated\_at").nullable().useCurrent().bindTo { it.updatedAt }
You can do this:
val id by bigIncrements()val createdAt by createdAt()val updatedAt by updatedAt()
โ๏ธ Routes reloading without re-running the app
๐ In dev mode, routes are now reloaded without restarting the app. For performance reason this is disabled in the prod mode.
โ๏ธ Run migrations using a name property
This allows to run migrations even from a fat jar. Very helpful in production.
โ๏ธ Added basic table modification support
You can now
addColumn()
anddropColumn()
โ๏ธ Reference Constraint
You can now add a reference constraint on a column:
val userId by long("user\_id").belongsTo(Users) { it.user }.unsigned().reference { onDeleteCascade() }
๐ฑ ๐ Improvements
โก๏ธ ๐ Assets handling is more optimized.
๐ ๐ You can seed a database with database refresh by using
--seed
flag.๐ฑ ๐ Improved strong typing while overriding an entity's properties in an entity factory.
val user = from(UserFactory) { it.name to "Jane M. Doe" it.email to "[email protected]"}
๐ฑ ๐ Breaking Changes
๐ There are few but significant breaking changes in this release:
๐คฆ๐ฝโโ๏ธ
Entity
has been renamed toOzoneEntity
andMigratingTable
has been renamed toOzoneTable
:// Before: interface User : Entity\<User\>// Now:interface User : OzoneEntity\<User\> { // ...// Before: companion object : Entity.Factory\<User\>// Now:companion object : OzoneEntity.Of\<User\>() }// Before: object Users : MigratingTable\<User\>// Now:object Users : OzoneTable\<User\>("users") { // ...}
๐คฆ๐ฝโโ๏ธ
EntityFactory
now takes two parameters instead of one:// Before: class UserFactory() : EntityFactory\<User\>()// Now:class UserFactory() : EntityFactory\<User, Users\>() { // ...}
๐คฆ๐ฝโโ๏ธ Methods Renamed:
onlyParams()
method has been renamed toparams()
paramAsString()
method is nowstringParam()
paramAsInt()
is nowintParam()
paramAsLong()
is nowlongParam()
paramAsBool()
is nowboolParam()
-
v0.14.3
February 10, 2020