Questions tagged [ebean]

Ebean is an open source Object Relational Mapping tool. It's goal is to provide a simpler alternative to JPA (Java Persistence API) implementations such as Hibernate and Eclipselink.

0
votes
0answers
7 views

Entity bean not enhanced error when deploying cxf soap war file to weblogic 12.2.1

I created two Entity Beans that will insert user data to a mysql database when a user logs in and when a user is billed. I decided to use Ebean ORM since, it's "lighweight" for just a table insert. ...
0
votes
0answers
8 views

How to use pagination the Ebean play framework entirely

How can we use the frame number to play all Ebean starting from creating a controller and see the page? I don't know what to do. I find it for a very long time. But I didn't find anything. I don't ...
1
vote
0answers
20 views

How to use 2 datasources with Ebean on a Play Framework 2.5 project?

I would like to split my default datasource to 2 different datasources (2 databases). I set my application.conf file: db { common.driver = org.mariadb.jdbc.Driver common.username = "root" ...
0
votes
0answers
20 views

How to check if a field is null in the table by using ebean methods

I am new to ebean and I want to return boolean if a field is null or not. I should iterate null check for every row and every column in the table. How should I return the single field from the table ? ...
0
votes
1answer
58 views

Database 'default' needs evolution! when trying connect to MySQL with play framework 2.7.0 and Ebean

I'm trying to set up a project using play framework 2.7.0, now I'm trying to connect to MySQL database using sbt-play-ebean 5.0.0. Here is my code. https://github.com/hiroya8649/play-mysql-ebean-test ...
0
votes
0answers
16 views

Ebean ORM Escape character ':' in SqlQuery

I have a row mysql query which contains := operator and is being treated as parameter, is there any work around for this. my query looks like SELECT CASE WHEN sleep_date = @last_ci + ...
0
votes
0answers
23 views

Many-to-many relationship on common column (not on primary keys)

I am trying to map tables to entities using jpa and ebean. I have two tables those have one common column: Table Phone: -id -number -area Table Client: -id -name -area I have to add between them ...
0
votes
0answers
13 views

How to get partial object from self referencing entity

How can I get partial result from self referencing entity that has a parent-child pair relationship? I've tried to get whole entity objects and then refactors it into partial object. I also tried ...
0
votes
0answers
22 views

cannot find symbol: method setBufferFetchSizeHint(java.lang.Integer) , & method :setDistinct(boolean)

I use play framework 2.5 and Ebean ORM My code; import com.avaje.ebean.Model; public static final Model.Finder<Long, ComEntity> select = new Finder<>(ComEntity.class); public static ...
0
votes
0answers
12 views

How to performe a RLIKE or REGEXP with Ebean?

I'd like to be able to search a column with a regexp using something like rlike(columnName, regexp) or regexp(columnName, regexp) with Ebean but I cannot figure out how to do it. What is the name of ...
0
votes
0answers
20 views

List of all Ebean exceptions

What are the different exceptions throws by Ebean for different errors? Also, I want to handle all the exceptions by the common error handler class. Like I should be able to throw the exception from ...
1
vote
0answers
30 views

How to write unit test for Ebean in play framework

I have an application based on play framework scala version 2.11.1. There are couple of methods for which I want to add unit tests. These methods have direct calls to database through Ebean. I tried ...
0
votes
0answers
23 views

Play Framework Ebean Repository Pattern vs Finders

When using Play Framework for a Restful API with Ebean, is either a Repository pattern or Finders considered a 'better' way of going about it? If not, are there benefits of using one over the other? ...
0
votes
1answer
27 views

Cannot use find.where() in Ebean Model

I'm trying to use an Ebean finder inside of a model. When I try to do find.where() it errors saying it cannot resolve the method. Model Code: package models; import io.ebean.Finder; import io....
0
votes
1answer
190 views

Package io.ebean does not exist Play Framework 2.7

So I'm trying to create a database with mySQL and Play Framework version 2.7x following the tutorial from Radix Code. I read the episode Play Framework Tutorial # 21| Enable Ebean ORM & JDBC ...
0
votes
0answers
53 views

play framework ebean cannot find symbol class: @Entity

Currently trying to set up the ebean database on play framework but does not seem to be working, below are images of the problems occurring and also my code. Not sure at all what the problem is, tried ...
1
vote
1answer
77 views

Prevent “order by” clause in Ebean

Ebean ORM adds sort by t0.id clause to every query and it leads to very very bad performance. I use Play Framework 2.6, H2 1.4 database and Ebean 11.15 (PlayEbean 4.1.3). I have a table with 100k ...
0
votes
0answers
59 views

Multithreading problem when trying select and insert in single method

friends! I'm working with Play+Java+Ebean. I've got a problem with parallel threads when trying to select and insert values to DB in one method. At first, I check the existence of a device in my DB(...
0
votes
0answers
22 views

Annotation in ebean to not generate specific DDL with evolution enabled in java playframework

In PlayFramework java, given two models First Model: @Entity @Table(name = "users") public class Users extends Model{ @Id public int id; public String name; public String email; } ...
0
votes
0answers
24 views

PostgresSQL|Scala: Any efficient way to interact using different Users for different queries with heavy ACL use

My whole interest in PostgreSQL is driven by its ACL system which is really powerful. To access the data in a Scala application I have two options in mind EBeans/JDBC or Slick FRM. Our application ...
1
vote
1answer
33 views

Unknown column '*_._ebean_intercept' in 'field list'

I'm upgraded my play 2.6.7 app to play 2.7.0-R8 and get error "Unknown column '*_._ebean_intercept' in 'field list'" of JPAApi when i try execute following code: jpaApi.withTransaction(entityManager -...
0
votes
0answers
21 views

Play framework & ebean getting table data from read only database as Json

So i am trying to get table data as json from one remote read-only oracle db view. My entities look something like this: Test.java @Entity @Table(schema = "`myschema`", name = "mytable") public ...
0
votes
0answers
21 views

Play framework multiple DB queries “SET autocommit=0/1” on each select

I am using Play Framework 2.6 with Ebean 4.0.6 I was going through my DB queries log and I noticed that each select request looks like this instead of single query: SET autocommit=0 select * FROM ......
4
votes
1answer
252 views

Play Framework and autogenerated evolutions

I love bootstrapping projects with Play! Ebean, in memory database : evolutions generates automatically when I need a new model, this is awesome. I am learning Play Scala, and there is a lack of ...
-2
votes
1answer
51 views

To extend a class which is already extends by ebean model class

I am developing a java playframework project.I am using Book class which is a sub class.It is extended from Item abstract class.I want to use com.avaje.ebean library and extend the Book class to add ...
1
vote
2answers
115 views

Ebean query for string that startsWith then contains a specific string

I got a little issue here with a query for a string to search in DB for auto-complete functionality, the problem that I got that I need first results to be all statements that "Start" with then the ...
1
vote
0answers
161 views

Play Framework: Bad type on operand stack

Code's written in scala but Exception is from java.lang. I am trying to connect my basic scala + play app to database. I am using a tutorial https://www.youtube.com/watch?v=Zdt_utUOd5s&list=...
0
votes
0answers
49 views

play framework ebean insert in repository ( without Form )

Can i use the method insert ebean written in my repository folder to import data from EXCEL to Database without initializing and injecting again ( EbeanConfig import ) in my controller ? Thank you so ...
0
votes
0answers
37 views

Java, IntelliJ, Ebean, _ebean_intercept Error

I am working with the technologies listed in the question title. I have a simple findNative() query setup. I build the project with the enhancer turned on and then run the project in debug mode. ...
0
votes
0answers
11 views

Performing tuple comparison using Ebean

Looking to see if Ebean can support native tuple comparison using gt, lt, etc. Example SQL I want to convert to standard Ebean logic: SELECT * FROM example_table t1 WHERE (t1.attribute_1, t1....
1
vote
0answers
16 views

Ebean doesn't update my postgreSQL database

I downloaded play-authenticate with its "play-authenticate-usage" example and changed from the h2 database implementation to the postgreSQL database. When I pick a specific User out of the table ...
0
votes
1answer
81 views

Play Scala 2.6 with Ebean : accessing an Entity field makes OneToMany associations empty

I have a OneToMany in my model, I would like (if possible) to access the field without query. Or at least, understand why the list is empty in some cases @Entity class Product extends Model { @...
1
vote
0answers
11 views

MySql Annotated Join in Ebean

I am trying to create a join in Java. My issue is that although my query below returns exactly what I want in mySql I cannot get the data out of the ORM. In fact it appears that I am getting rows for ...
0
votes
0answers
18 views

Java / Ebeans SQLException

Error Query threw SQLException:'49180950926' in column '1' is outside valid range for the datatype INTEGER. Bind values:[] Query was:SELECT * from myTable WHERE myData= ? My Row Object (Java) @Id ...
1
vote
1answer
40 views

Playframework 2.5 [Java]: I can't insert one column data to my database

I'm using MySQL with Play, when I use Ebean to save data, all the data seems to be there except one column. The following is my account entity: @Entity public class Account extends Model { ...
0
votes
0answers
13 views

@ManyToMany insert Ebean does'nt work playframework

I have one class which reference other : class Video{ @ManyToMany(cascade = CascadeType.ALL) public List<SmartTag> tags; ...set/get } and then in a method i want update video object List&...
0
votes
0answers
19 views

Cursor-based pagination an Ebean query

I'm looking for a way to use a cursor to paginate an Ebean query. This would be easy if I was ordering my results by an incrementing column, but that will not be the case. It could be ordered many ...
0
votes
0answers
37 views

How to limit the MySQL Query with Ebean in Play Framework 2.6

I am trying to list a large amount of Data (from the Database). When i am using the "find.all()" the Play Framework Server crashes, since it takes to much memory. I am trying to limit the all() Query ...
0
votes
0answers
19 views

Unable to delete child data by using delete() in Ebean ORM

I am using 'PlayFramework' with 'Ebean ORM' Step1: For deleting the child data I wrote code like below for (Child child: parent.getChilds()) { child.delete(); } Step2: I added the ...
0
votes
1answer
75 views

Play Mapping ignore RawSQL Ebean

I'm using Play Framework 2.3 and I always have trouble with mapping ignore when I try to create my own sql query. I don't know if I should use Ebean to write this complexe sql query. This is the SQL ...
0
votes
1answer
111 views

Using Ebean View `@View` without duplicating models

I am trying to create Ebean views on tables based on a simple join and I am running into issues when I try to extend the Model for the base table. The Views fields and the Models fields are the ...
0
votes
1answer
370 views

Play Framework 2.6.x ebean : DataSource is null in production only

Java Version: 9.0.4 (I tried on 10.0.2 as well) Play Version: 2.6.15 (also 2.6.18) Play-ebean: 4.1.3 The project runs fine with sbt run, but trying to run it in production (exactly the same ...
0
votes
0answers
75 views

Ebean Embedded Composite primary foreign key Mapping save error on cascade type all

I have an entity that needs to cascade a oneToMany relation: @Entity @Table(name = "internationalizations") public class Internationalization extends Model { @OneToMany( mappedBy = "...
0
votes
0answers
113 views

Ebean property name for class in SQL query to avoid ambiguous column

I am having two classes and writing ebean query here: @Entity public class User extends Model { @Id @Column(name = "user_index") private int id; @Column(name = "user_first_name") private String ...
3
votes
1answer
155 views

EBean enhancement maven

I'm trying to get Ebean working in my spring Kotlin project, but I keep getting this exception when I run my application: Caused by: java.lang.IllegalStateException: Bean class com.sshmanager.server....
1
vote
0answers
32 views

Can you use Hibernate and eBean in the same project?

I have a legacy app that has hundreds of Hibernate 5.1 Criteria queries. Moving to Hibernate 5.2+, these all have to be rewritten using the JPA CriteriaQuery (deprecation warnings in 5.2, I think ...
0
votes
0answers
121 views

How to implement cursor-based pagination with Ebean

The goal is to load rows paginated from a database with Ebean. Imagine we want to print "Rows 1 to 10 of 10000". Typically, this calls for two queries. One to get the count of all records, and the ...
0
votes
1answer
29 views

With jackson, how to serialize only some property of an ebean object when it is part of another object

I have an API I can call to get some Json objects. Let's say I have two kind of objects : A and B . an A objects have a B object amongst its instance variables. When I call my API to get someB, I ...
0
votes
0answers
27 views

Ebean setIncludeSoftDeletes() throw SQLException

I have two table with @History and @SoftDelet each. When I work with non deleted data it is fine. But when I try find a deleted data for model which contains field with EAGER loading option, using ...
0
votes
0answers
35 views

Trying to get Play, Ebean and H2 to work together results in “Bad play-ebean configuration, check your configuration file”

I'm trying to get H2 and Ebean to work together in PlayFramework, but it always results in Error in custom provider, java.lang.RuntimeException: Bad play-ebean configuration, check your configuration ...