ebean Questions
2
I'm having some trouble to join 2 expressionList with an "or".
This is an example of what I'm doing:
RelationGroup prg =...
ExpressionList<User> exp = User.find.where();
List<ExpressionLi...
Finish asked 12/6, 2012 at 10:55
2
Solved
Im trying to follow the play framework ebean tutorial here:
http://www.playframework.com/documentation/2.1.2/JavaEbean
However when I try to include play.db.ebean.* and try to compile, the packag...
Footpad asked 9/9, 2013 at 10:25
2
Solved
Recently upgraded to Play 2.4 and I'm still learning all the little quirks and such. I'm trying to just get my index page working and I'm having a hard time of it, and I know it's something small I...
Nabonidus asked 6/7, 2015 at 10:57
3
Solved
i am getting this error while trying to save data into model in db.
@Entity
public class User extends Model {
@Required
public String name;
@Email
public String email;
@Required @MaxLength...
C asked 29/6, 2012 at 11:13
1
Solved
I'm using Playframework for the firstime in combination with Ebean.
Now I want to use MySQL as database so I added:
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost...
Ancylostomiasis asked 17/2, 2015 at 7:53
1
It seems that when using Play Framework 2.2.2 with eBean ORM the @play.db.ebean.Transactional
does not rollback transaction when an Exception is thrown.
Does someone of you know something about t...
Washery asked 1/4, 2014 at 19:50
1
Solved
This is related to this question, but the example below is shorter, so I figured another question on this would make sense.
I have two entities, A and B, in a one-to-one relationship. For an A, a ...
Guv asked 20/6, 2013 at 20:29
2
I have a model called "EventCheckin" which has a ManyToOne mapping to an "Event" and a "User". The PrimaryKey of the "EventCheckin" table is the id of the user and the id of the event. I'm trying t...
Clarissa asked 26/3, 2012 at 18:3
4
Solved
I have a Play 2.1.3 Java app using Ebean. I am getting the OptimisticLockException below.
[OptimisticLockException: Data has changed. updated [0] rows sql[update person
set name=? where id=? and ...
Lynxeyed asked 2/12, 2013 at 22:15
2
I have a play framework 2.0.4 application that wants to modify rows in db.
I need to update 'few' messages in db to status "opened" (read messages)
I did it like below
String sql = " UPDATE mess...
Bradfordbradlee asked 18/12, 2012 at 12:53
2
Solved
I am getting the following error when running my Play Framework 2.2.x (Java) project:
Configuration error
Cannot register class [models.SomeClass] in Ebean server
The error messages displayed in...
Disaccustom asked 3/12, 2013 at 20:48
2
Solved
I am using Play Framework and Ebean ORM. Say, I have 2 related entity classes (Card.java and FinalMark.java)
Card.java
@Entity
public class Card extends Model {
private static final long serial...
Felafel asked 29/5, 2014 at 4:7
1
Is the any other way to delete all rows of a database table without writing an SQL delete statement?
List<Item> items = Ebean.find(Item.class).findList();
Ebean.delete(items);
Is there any...
Roland asked 14/5, 2014 at 7:16
1
I'm working with the last release of playframework (2.0.4) and the Ebean ORM.
Here is my simplified db schema
TABLENAME (FIELD_NAME (, ...) )
User (id)
Group (id)
UserGroup (user_id, group_id, is_...
Mylor asked 16/11, 2012 at 15:57
3
I have 2 databases that I need to connect to. I can easily connect to them in the application.conf file like so:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://localhost...
Attalie asked 19/8, 2013 at 1:31
1
Solved
I wanted to unit test my database operation and I found this code. However, I get the followin error:
[CityGame] $ test
[info] Compiling 2 Java sources to /Users/pmichna/Documents/code/citygame/ta...
Amidase asked 16/12, 2013 at 23:26
1
Solved
I created a schema in MySQL Workbench:
How do I map this to entities in Ebean in Play Framework? In the tutorials they use approach to write a model class, annotate it with @Entity and let Play ge...
Staves asked 16/12, 2013 at 12:33
2
Solved
Ok, lets say I have order and items tables. This is how items are described in my Order class:
@ManyToMany(cascade=CascadeType.PERSIST)
@JoinTable(name="MY_ORDER_ITEM_BRIDGE",
joinColumns=@JoinCol...
Coltun asked 10/12, 2013 at 2:45
1
Solved
Lets say I have these tables:
ORDER: id
ITEM: id
ORDER_ITEM: order_id, item_id
The table: ORDER_ITEM is a bridge table between ORDER and ITEM.
How do I describe this threesome to Ebean?
I wou...
Unsound asked 8/11, 2013 at 2:21
2
I'm using Play Framework 2 and Ebean. When a user submits a form to edit an existing object in the database, it doesn't save null values. I guess this is to prevent overwriting fields that aren't i...
Landry asked 10/2, 2013 at 6:10
1
Solved
I am trying to create the following class in Play using Ebean:
public class BaseModel extends Model {
@Column(name = "created_at")
public Date createdAt;
@Column(name = "updated_at")
public ...
Ornis asked 4/11, 2013 at 15:29
2
i have a simple User model like this:
package models;
import java.util.*;
import javax.persistence.*;
import play.db.ebean.*;
@Entity
public class User extends Model {
@Id
public Long id;
pu...
Adult asked 28/7, 2012 at 9:15
1
In my play-framework-based web application users can download all the rows of different database tables in csv or json format. Tables are relatively large (100k+ rows) and I am trying to stream bac...
Stander asked 9/10, 2013 at 22:35
1
Solved
I am writing a web application in Java by using Play Framework 2.1.0. And I am using Ebean to manipulate the database. But I got one problem now:
I have a model class called book with an int type ...
Herbivorous asked 23/8, 2013 at 14:19
2
Solved
I have problem with understanding how to work with ebean transactions under play 2.1.1.
Ebean.execute(txScope, new TxRunnable() {
public void run() {
Ebean.beginTransaction();
System.out.pri...
Skep asked 12/6, 2013 at 21:56
© 2022 - 2024 — McMap. All rights reserved.