About entities

forum_thread

Issue with alias

Hi, This query works and correctly casts and selects my entity into the tuplet: SELECT $1, ((com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedDebitorenKontoFragment)$1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedDebitorenKontoFragment')) AS DEB FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE DEB.debitor=true however, trying to access "DEB" in the where clause causes an "unexpected token" error? Alex #1 2012-01-17 04:30 Hi, This query works and correctly casts and selects my entity into the tuplet: SELECT $1 , ...

 
tutorial

Getting Started with JPA

Getting started tutorial for step by step quick start with using Java Persistence API (JPA). This tutorial demonstrates how to create and run a simple JPA application. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  Point has two persistent fields -  x and  y ...

 
forum_thread

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) List<A> aClasses; } Now, I want to fetch all B classes with all A classes skipping lazy loading: #1 2012-07-11 07:50 Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have t ...

 
tutorial

Step 3: Define a Spring DAO Component

Explains how to define a JPA DAO component (bean) in an Eclipse Spring MVC JPA web application project. Operations on the database will be performed by an instance of a Data Access Object (DAO) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right clicking the guest packa ...

 
api-jpa

javax.persistence.PrePersist

Is used to specify callback methods for the corresponding lifecycle event.(Annotation of JPA)

 
api-jpa

javax.persistence.PostPersist

Is used to specify callback methods for the corresponding lifecycle event.(Annotation of JPA)

 
api-jpa

PersistenceUnit.unitName

(Optional) The name of the persistence unit as defined in the persistence.xml file.(Annotation Element of javax.persistence.PersistenceUnit)

 
api-jpa

javax.persistence.metamodel.Bindable

Instances of the type Bindable represent object or attribute types that can be bound into a Path.(Interface of JPA)

 
forum_thread

g when using SIZE in combination with date lower parameter

Hello, I have 2 entity types, which I want to query, ParserJob and Tag. Unfortunately there seems to be a bug if I use the lower date select: SELECT j.jobId, SIZE(j.tags) FROM ParserJob j WHERE j.dateCreated < :date This returns a SIZE(j.tags) of 0 Tags, but the only existing ParserJob has 1 Tag. If I run the query: SELECT j.jobId, SIZE(j.tags) FROM ParserJob j WHERE j.dateCreated >= :date I get the correct result (1 Tag). #1 2017-11-10 10:46 Hello, I have 2 entity types, which I want to query, ParserJob and Tag. Unfortunately there seems to be a ...

 
api-jpa

javax.persistence.metamodel.SingularAttribute

Instances of the type SingularAttribute represents persistent single-valued properties or fields.(Interface of JPA)