Community contributed extensions

Since v2.0.0, the project is hosted by Github play-crud-siena under MIT license

CRUD Siena Play! v2.x

Release notes

IMPORTANT The main difference to know is that now SienaSupport class has been removed completely as the Siena Crud manages any Siena Class if there is a Controller for it.

Note v1.x only supported GAE but this is not the case anymore. Other NoSQL Databases will be added later.

Enable Crud Siena support

Install Siena module

play install siena-2.0.0

Install CrudSiena module

play install crudsiena-2.0.0

Add CrudSiena module to your dependencies

In your /conf/dependencies.yml file, enable the CrudSiena module by adding these lines:

    - play -> play [1.2.1,)
    - play -> crudsiena [2.0.0,)

Siena module is brought by transitivity through crudsiena
We ensure that you have at least Play 1.2.1.

IMPORTANT Do not add default crud dependency, it would collide with Siena Crud.

Configure your database

For this, please refer to Siena module

Provide a simple Siena model

IMPORTANT you don’t need to extend SienaSupport anymore.

For example:

public class Employee extends Model {

        public Long id; 

        @Max(100) @NotNull
        public String firstName;      

For more information about Siena Model, please refer to Siena module

Create a CRUD controller inheriting class CRUD

For each Siena entity requiring CRUD support, create a controller.
You just have to annotate your controller with @For(ModelClass).

For example:

public class Employees extends controllers.CRUD {

Enable routes to the CRUD module

At the beginning of your conf/routes file, add:

*    /admin    module:crudsiena

Play Validation with Siena annotations

These are Siena model Annotations managed by the CrudSiena module:

Play Validation with Play annotations

These are Play Annotations managed by the CrudSiena module:

Specific CrudSiena annotations

(thanks to Spreiter301 for his contribution... see googlecode issue)
Be careful this annotation calls DB requests that can be quite heavy so it might impact your application performance. (I will try to provide a mechanism to control where this annotation is applied but it is not so trivial)

Known limitations

This is the first version and issues will be found for sure.
So don’t hesitate to tell me about it or to open issues on github project