com.jensfendler:ninja-ebean-ng

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

Ebean Data ORM Ninja User Interface Web Frameworks
GroupId

GroupId

com.jensfendler
ArtifactId

ArtifactId

ninja-ebean-ng
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

pom
Description

Description

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

http://www.jensfendler.com/
Source Code Management

Source Code Management

https://github.com/jfendler/ninja-ebean-ng

Download ninja-ebean-ng

Filename Size
ninja-ebean-ng-0.0.1.pom 3 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.jensfendler/ninja-ebean-ng/ -->
<dependency>
    <groupId>com.jensfendler</groupId>
    <artifactId>ninja-ebean-ng</artifactId>
    <version>0.0.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.jensfendler/ninja-ebean-ng/
implementation 'com.jensfendler:ninja-ebean-ng:0.0.1'
// https://jarcasting.com/artifacts/com.jensfendler/ninja-ebean-ng/
implementation ("com.jensfendler:ninja-ebean-ng:0.0.1")
'com.jensfendler:ninja-ebean-ng:pom:0.0.1'
<dependency org="com.jensfendler" name="ninja-ebean-ng" rev="0.0.1">
  <artifact name="ninja-ebean-ng" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.jensfendler', module='ninja-ebean-ng', version='0.0.1')
)
libraryDependencies += "com.jensfendler" % "ninja-ebean-ng" % "0.0.1"
[com.jensfendler/ninja-ebean-ng "0.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • ninja-ebean-ng-module
  • ninja-ebean-ng-demo
 _______  .___ _______        ____.  _____   
 \      \ |   |\      \      |    | /  _  \  
 /   |   \|   |/   |   \     |    |/  /_\  \
/    |    \   /    |    \/\__|    /    |    \
\____|__  /___\____|__  /\________\____|__  /
     web\/framework   \/                  \/

EBean "NG" (post-7.2.3) support for Ninja

EBean is a simple and powerful ORM tool. This plugin allows you to use EBean in any Ninja application.

Due to a change to the EBean API, the original ninja-ebean module only supports the EBean ORM up to version 7.2.3. In order to not break existing applications, this module is basically a copy of the original module, but provides the new API exclusively, which is likely useful for new applications.

More

Getting started

Configuring the module for your application is quite easy. There is a demo application that shows you how to do it. Check out subproject ninja-ebean-demo/pom.xml for further information.

More about EBean ORM

Overview

This module actually works with the latest versions of EBean. The module itself depends on version 7.20.1. Since this module more or less configures the Ebean server, it should be compatible with any Ebean release that continues to support current configuration properties.

Compatibility with EBean versions up to 7.2.3 is provided through the original ninja-ebean module, which may also support legacy versions of Ebean ORM.

NOTE: This module only supports a single (default) Ebean server. Feel free to contribute code to the project if you need other features. Thanks!

Setup

  1. Add your db conf to your application.conf file. For a simple H2 database:

    ebean.datasource.databaseUrl=jdbc:h2:./testdatabase:tests;DB_CLOSE_DELAY=-1;AUTO_SERVER=TRUE

For a MySQL database (you'll also need to add the MySQL driver dependency to your project)

ebean.ddl.generate = false
ebean.ddl.run = false
ebean.models = com.company.models.*,org.otherorg.models.Foo
ebean.datasource.name = NameOfEbeanServer
ebean.datasource.databaseUrl = jdbc:mysql://localhost:3306/dbname
ebean.datasource.databaseDriver = com.mysql.jdbc.Driver
ebean.datasource.username = root
ebean.datasource.password = test

Please note that ebean.models accepts a comma delimited list of both class names as well as packages (just make sure it ends with .*)

  1. Add the ninja-ebeans dependency to your pom.xml:

    com.jensfendler ninja-ebean-ng-module 0.0.1
  2. Add ebean's enhancer plugin to your pom.xml:

    org.avaje.ebeanorm avaje-ebeanorm-mavenenhancer 4.10.1 ebean-enhancer process-classes ${project.build.outputDirectory} models debug=1 enhance
  3. Install the module in your conf.Module:

    protected void configure() { // This installs the NinjaEbeanNGModule and handles the lifecycle install(new NinjaEbeanNGModule()); }

And that's it already :)

Thanks

Many thanks go to the original authors of the ninja-ebean module, in particular Raphael Bauer and Joe Lauer, for virtually all the code in this module. Although I hope to maintain and improve this module over time, it would not exist without them.

Versions

Version
0.0.1