ebean Questions

3

I have following class: @Entity @Table(name = "clients") public class Client extends Model { @Id public int id; @Formula(select = "inv.some_data", join = "left join (select 1 as some_data) a...
Bloomy asked 14/9, 2012 at 9:2

2

Solved

I am using Ebean with Play Framework 2 and sometimes it falls with OptimisticLockException of such kind: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[OptimisticLockExc...
Alienor asked 27/9, 2012 at 8:59

1

Solved

I am using the Play Framework with Ebean and H2 database. The problem is, the BigDecimal results in the DB script as: sum decimal(38), but what I want is: sum decimal(38,2), I already trie...
Bharat asked 22/3, 2013 at 10:26

1

What is the correct way to eager fetch a nested collection in ebean and Play Framework 2? I tried this: Registration registration = find .fetch("participants") .fetch("participants.fieldValues")...

4

I want to know if is it possible to use @PrePersist and @PreUpdate with Ebean and Play! 2.0. If so how is this feature activated. I've seen that there was a pull request adding this feature a month...
Verticillaster asked 29/3, 2012 at 1:58

2

Solved

I have the following classes: import play.db.ebean.Model; import javax.persistence.*; @Entity public class A extends Model { @Id private int id; /* Other irrelevant properties */ @OneToOne(...
Leggett asked 23/8, 2012 at 13:45

2

I have problems mapping a Collection of Strings and Enums in my entities. I have followed different advices, but nothing seem to work. I am using PlayFramework 2.0 and the provided Ebean as ORM. H...
Crate asked 5/5, 2012 at 1:41

2

Solved

After some research on Google, I haven't found anyone who has my problem that's why I'm posting it here. In my application I have three entities : User (abstract), Customer, Agency. Customer and Ag...
Settler asked 8/8, 2012 at 20:6

5

Solved

In the last time I heard a lot of complaining about Hibernate. And indeed I have some painful experiences with Hibernate too. So I read about Ebean and Siena. Both have interesting approaches...
Koenraad asked 3/12, 2010 at 19:53

1

Solved

I have two classes, user and car. Both have ManyToMany mapping to each other. User: @Entity public class User extends Model { private int year; @ManyToMany(cascade=CascadeType.ALL) private L...
Abduce asked 16/11, 2012 at 15:31

2

Solved

I need to fill a table with large amount of data so I don't want to find related objects, but just put numeric values of them. For this I'd build a simple query ie: INSERT INTO article_category (a...
Attenweiler asked 22/10, 2012 at 18:23

1

Solved

Using Play Framework, I have a model like this : class MyModel extends Model { // Some columns @ManyToOne public OtherModel other; public OtherModel getOther() { return other; } } For a ...
Forget asked 22/10, 2012 at 12:51

2

Solved

When I define a variable in Model class as a String, it is converted as 'VARCHAR(255)' in DB. However, I want to save more than 255 because this data is very long text consisting of several paragr...
Arun asked 10/9, 2012 at 3:30

1

Solved

I'm using the concept of single table inheritance because of OOP considerations of course. for example, PostLike and TopicLike inherit from Like class. I see two problems with this methodology: ...
Vaccination asked 30/9, 2012 at 12:56

3

Solved

As the title suggests, I get an error running Play 2.0.1 Tests using a FakeApplication w/ H2 in memory. I set up a basic unit test: public class ModelTest { @Test public void checkThatIndustrie...
Cuthbert asked 3/6, 2012 at 10:20

1

Solved

I am using Play 2.0.2 with ebean. In Info class, I defined @ManyToMany(fetch=FetchType.EAGER) private Set<MemberInfo> members; private Date createdDate = new Date(); And MemberInfo has ...
Electrometer asked 28/7, 2012 at 18:31

1

Solved

I have this enum : public enum DocumentTypes { PDF("PDF Document"), JPG("Image files (JPG)"), DOC("Microsoft Word documents"); private final String displayName; D...
Peder asked 18/7, 2012 at 12:30

1

Solved

So I have the below code. Where I am trying to create a table called SecurityType which has values ID and description. I would like to add two strings "Administrator" and "user" to it. Is there a w...
Steere asked 28/6, 2012 at 0:59

1

I have an id: @Column(name = "device") @GeneratedValue(strategy = GenerationType.AUTO, generator = "device_gen") @SequenceGenerator(name = "device_gen", sequenceName = "device_id") @Id public Inte...
Elusion asked 24/4, 2012 at 12:25

1

Solved

This is the entity contains blob type: @Entity @Table(name="image_info") public class ImageInfo extends Model { ....... @Constraints.Required private Blob image; ....... } $ play -DapplyE...
Sissie asked 29/5, 2012 at 23:22

1

Solved

I'm using the PlayFramework and I'm really liking it. When I want to grab data from a table, for example I have a user table, I use the following syntax: List<User> users = User.find.where()...
Fallonfallout asked 29/5, 2012 at 3:51

1

Solved

I'm following the Play Framework 2.0 tutorial for Java and get this error when trying to save an ebean Model (task.save()). [PersistenceException: The type [class models.Task] is not a register...
Oneman asked 22/3, 2012 at 14:22

3

Solved

I'm new to Scala and to Play, and I'm considering using them for a new project. I see the development on Play 2 is coming along nicely, although the stable version is still 1.x. And there are subs...
Seasick asked 25/11, 2011 at 1:24

© 2022 - 2024 — McMap. All rights reserved.