Questions tagged [blaze-persistence]

30 questions
0
votes
1 answer

How to map a boolean field expression using Blaze Persistence Entity View

I have the following entity view model which I'm trying to convert from a spring data @Projection to the blaze @EntityView equivalent @Projection(types = Car.class) @EntityView(Car.class) public interface CarEntityView { String getMake(); …
IgorK
  • 55
  • 1
  • 4
0
votes
1 answer

Using Blaze Persistence optional parameter in subquery

In Blaze Persistence, is there a way to use an optional parameter in a subquery? In my current use case, let's say I have topics, users, and a third table called topic_last_seen to record the date at which each user has last read each topic. I would…
cg.
  • 3,648
  • 2
  • 26
  • 30
0
votes
1 answer

How do I implement multiple root entities on a Blaze Persistence query?

According to the Blaze Persistence Document, a query could have multiple root entities. However, I could not find the way to do it. How do I implement multiple root entities on a Blaze Persistence query? Add Solved problem: I implemented the…
ecormaksin
  • 19
  • 4
0
votes
2 answers

ClassCastException occurs when I am trying the Blaze Persistence documentation sample

I'm trying the sample code in the document '1.5. First criteria query' section. The code is below, CriteriaBuilder cb = cbf.create(em, Cat.class, "c") .where("c.age").betweenExpression("5").andExpression("10") …
ecormaksin
  • 19
  • 4
0
votes
1 answer

Loading Blaze-persistence entity view by JPA specification

I have a "vanilla" JPA specification prepared for certain entity. I also have Blase-persistence entity view interface prepared for the same entity. How can I load that entity view using prepared JPA specification? Edit: Currently, I'm using this…
0
votes
1 answer

Wrong result metadata when using pagination with Balze-Persistence

When I fetch all results without pagination result is OK but when use pagination appear problem in pagination metadata Page p=PageImpl(result.getResults(), PageRequest.of(pageNo, pageSize), result.getTotal()) p.getTotalElements() // wrong…
java dev
  • 313
  • 1
  • 3
  • 12
0
votes
1 answer

How to create an EntityView with field that is not mapped to Entity

I have a scenario where i have to fine multiple queries to get the result. Since EntityView is interface and if i want to send API response with some custom attributes that is not defined in Entity, how can i do…
Mayuran
  • 669
  • 2
  • 8
  • 39
0
votes
0 answers

Blaze Persistence Null Pointer Exception when updating entities in native quarkus

I have a strange behaviour when updating entities (via entity views) in Quarkus native (it works fine on jvm). These are my entities: @Entity public class Role extends BaseEntity { private boolean deleted; private String…
E. Marotti
  • 89
  • 7
0
votes
1 answer

Blaze Persistence skip null parameters in where expression

is there a way to skip null parameters in where expression? Let's suppose I have the following code: Boolean deleted = null; var criteriaBuilder = cbf.create(em, MyClass.class) .where("deleted").eq(deleted); I would want to skip…
E. Marotti
  • 89
  • 7
0
votes
1 answer

Blaze Persistence EntityView inheritance mapping

I'm currently using Quarkus combined with Blaze Persistence for my microservice. I have the following entity model: @Entity public class Content extends BaseEntity { private boolean deleted; private boolean published; } @Entity public class…
E. Marotti
  • 89
  • 7
0
votes
1 answer

How to call oracle's CONTAINS function in BlazeJPAQuery subquery where clause?

I'm trying to find entities by their collection elements properties. I also need to get score from oracle text index. Here is my query code. List fetch = new BlazeJPAQuery<>(entityManager, criteriaBuilderFactory) …
0
votes
0 answers

IncompatibleClassChangeError when invoking resolveFieldClass in JpaMetamodelUtils

I've been using blaze-persistence CriteriaBuilder for keyset pagination in my project. This was working fine until recently when I started getting IncompatibleClassChangeError runtime exception. This happens in a couple scenarios. On Application…
0
votes
1 answer

Blaze Persistence Join on subquery issue

I am trying to do a join on subquery by using blaze bit persistence, I have a criteria builder like below, cbf.create(em, b.class, "foo") .innerJoinOnSubquery(aCTE.class, "maxEnt") .from(a.class, "subFoo") …
Arun Prasat
  • 340
  • 1
  • 9
0
votes
1 answer

Blaze-Persistence GROUP BY in LEFT JOIN SUBQUERY with COALESCE in root query

I need statistics about alert tagged by codes. Alerts are visible for users with group based restrictions. In case when some tag code is only in alerts which are invisible for user then 0 should be displayed in statisitics. Tables…
bmlynarczyk
  • 808
  • 10
  • 19
0
votes
1 answer

Does blaze persistence support entity to hashmap conversion

Does blaze persistence support conversion of entity to key value pairs, also can EntityView fields have a different name than that of actual Entity @Entity @Table(name = "users") public class User { @Column private String name; …
solecoder
  • 191
  • 3
  • 12
1
2