About Id

forum_thread

Help with 'not like/lower' query

Hi again,   Honestly, I'm fairly new with JPA2 Criteria queries - but as far as code effort goes, it has saved me a bit of pain. I'm writing a dynamic query builder (only 1 level deep for basic entities) - but  even though I get most queries to work, I am getting the following error. This is using Criteria with a combination of LOWER/UPPER - NOT LIKE: ... - NOT LIKE: SELECT COUNT ( $1 . id ) FROM User $1 WHERE ( $1 . owningCompany = :p1 ...

 
forum_thread

Insert time increases as db grows.

Hello, ... of 22 linked entites. I've got indexes on Long id on every entity and additionally one entity have index on String column. ...

 
forum_thread

persitencia (Preguntas y respuestas)

1ra.pregunta:     tengo un formulario y cuando grabo mas de un registro, solo me grava el ultimo mas no los anteriores. 2da.Pregunta:    Tengo un indice que no es el ID y necesito que mi tabla muestre los datos de acuerdo al indice. Como                          puedo hacerlo?. Alguien me sugiere algo. Gracias   ... 2da.Pregunta: Tengo un indice que no se el ID y necesito que mi tabla muestre los datos de acuerdo al indice. ...

 
api-jdo

pinAll(oids)

Pin the parameter instances in the second-level cache.(Method of javax.jdo.datastore.DataStoreCache)

 
api-jpa

GeneratedValue.generator

(Optional) The name of the primary key generator to use as specified in the SequenceGenerator or TableGenerator annotation.(Annotation Element of javax.persistence.GeneratedValue)

 
api-jpa

javax.persistence.SqlResultSetMapping

Specifies the mapping of the result of a native SQL query.(Annotation of JPA)

 
api-jdo

getObjectById(cls, key)

Looks up the instance of the given type with the given key.(Method of javax.jdo.PersistenceManager)

 
api-jdo

jdoNewInstance(sm, oid)

Return a new instance of this class, with the jdoStateManager set to the parameter, key fields initialized to the values in the oid, and jdoFlags set to LOAD_REQUIRED.(Method of javax.jdo.spi.PersistenceCapable)

 
forum_thread

Does aggregate function "greatest" work on entity objects?

do not come to the function "compareTo" @Entity public class ChatHistoryItem extends AbstractObject implements Comparable {     private static final long serialVersionUID = 1L; ... return "granat.dp.domain.entity.DialogItem[ id=" + getId ( ) + " ]" ; } ...

 
forum_thread

java.lang.ClassCastException in OSGi runtime when loading data from DB

Hello, I'm trying to use ObjectDB in an OSGi environment (Karaf 4.0.7). I'm now facing ClassCastExceptions on my "entity" classes when I try to read data from the DB. In a very old (2011?) forum entry this problem was already discussed and it appears to be related to classloader problems. My entity is a dedicated bundle. I have one bundle with the database service (doing the actual objectdb actions -> persist, query etc). ... @Override public Person loadPerson(final Integer id) {   TypedQuery<Person> typedQuery = entityManager.createQuery("SELECT FROM Person p WHERE p.id = 1", Person.class);   Person singleResult = ...