ObjectDB Database Search

101-150 of 200 results

ClassCastException on SELECT NEW ... after UPDATE over Java RMI

internally runs SELECT NEW ... queries. For example: SELECT NEW com.arunta.base.db.FileNameDTO(r.id, r.fileName) FROM RecordingMetaData AS r WHERE ... A remote RMI client runs SELECT (but not SELECT ... is that once we UPDATE a record from the client (via the RMI interface), all SELECT NEW ... queries

Problem with distinct select, order by and equivalent alias/attribute path

;  String q1 = " select distinct s_location "          ... ;   q1 = " select distinct s.location "          ... ;   String q2 = " select distinct s.location "        

Multi selection and distinct in a criteria query

hi, How can I realize multi selection with the criteria api concerning distinct? I.e. doing something like SELECT DISTINCT $1, $2 wouldn't work because I do only have something like criteria.multiselect(...) and nothing like builder.distinct( selection ) so that I could do something like criteria

Is there any faster select method?

SELECT : TypedQuery query = em.createQuery(     " SELECT p FROM Point p WHERE p ... ); ** the Point class is of the tutorial. I found the above select method is ten times slower ... . Is there any faster method of select ? TIA pikotenta pikotenta Entity objects can be retrieved by

selecting objects that have a particular key/value in persistant HashMap

create a JPA query that selects such objects?  Something like the following (but clearly does not work) :  SELECT p FROM Person p where p.pMap['location']='California' Any thoughts?  Thanks, -Adam   adamMc Adam Please try the following query: SELECT p FROM Person p WHERE p.pMap

Wrong select results

Hello, I got a realy strange SELECT problem. In explorer query " select p  from Player p where p.confirmed==false", given me some results with p.confirmed==TRUE. And when I try to do (see image) " select p, p.confirmed  from Player p where p.confirmed==false", I getting p-confirmed-true

Selecting random rows

Hello is there way to get random rows? Functions like rand(), random(), newid() doesn't work ;/ for example: em.createQuery(" SELECT s FROM StawkaVat s ORDER BY rand()").setMaxResults(5).getResultList(); gives exception: Exception in thread "AWT-EventQueue-0" [ObjectDB 2.5.6_02] SELECT s FROM StawkaVat s == rand

Conditional Selection

so when I use... SELECT firstName + " " + middleName + " " + lastName FROM Employee     ... an additional field. e.g. displayName . Use a method in the SELECT clause. It could be a static method

Embedded Entity in EmbeddedId not persisted. Error 631 at select.

;   issue: In case 1 transaction is committed, but select fails!  *   *     ... (em.createQuery(" select a from A a", A.class).getResultList());     }   

Performance in SELECT statement

) Example query looks like : String strSelect = " SELECT e FROM TestEntity WHERE e.state.entityState IN

Unexpected query token 'delete' (SELECT is expected) (error 752)

simple codes(see attachment), failed.   gzdillon Lai Yang DELETE queries should not be run with getSingleResult ( which is for SELECT queries). Use executeUpdate instead. See this manual page . support Support

A nested SELECT

Hello. I have a query UPDATE Look l SET l.partlySold = FALSE WHERE ( SELECT count(a) FROM l.things a WHERE a.thing.status != :status)

select query for a HashMap field of an entity.

select query for a HashMap field of an entity.

Class fields selection to store

Class fields selection to store

selective update does not work

selective update does not work

Selective merge/cascade of detatched entity

Selective merge/cascade of detatched entity

Entity Management Settings

, supported only on selected JVMs. The reflection attribute specifies how non enhanced classes

Posting Sample Code

(" SELECT e FROM MyEntity e");         List resultList = query

ObjectDB Object Database Features

, max) - for paging. Query Structure SELECT (including NEW ). FROM (including INNER JOIN , LEFT OUTER

Chapter 4 - JPA Queries (JPQL / Criteria)

(and a criteria query) is explained by describing the main clauses of JPQL queries ( SELECT , FROM, WHERE, GROUP

JPA Primary Key

and a benchmark might be needed to evaluate the different alternatives in order to select the best solution.

SSL Configuration

as a "man in the middle attack"). The server, on the other hand, might be less selective and allow

Issue with DISTINCT Select

It is getting more and more frustrating :( We've introduced distinct select instead of regular selection in our code (no changes else) and suddenly receive invalid identifiers in queries exceptions ... ) multiple times for different selections in the same query!! so after debugging the query returns

Using SELECT BETWEEN with LocalDate

I am trying to query all entities whose date is between today and today + X days. The date inside the entity is a LocalDate . To do so I created the following query: .createQuery( " SELECT e FROM ... the SELECT a Date is used and not a LocalDate , so I ignored this error. Now I tried a LocalDate

Deletion of an entry via the table window always deletes the last entry not the selected one

If I open a class in the explorer via the "Open Table Window" button, select a row by its index and prex "Del" or use right click "Delete" the last entry of the table is removed and not the selected one. If I try the same using the "Open Tree Window" it works as expected. Kevin Kevin Pfaff Thank

NullpointerException at a normal select

When I run the following code: EntityManager em = getEm(); Customer result = null; try {     logger.debug("Ident: "+ident);     result = em.createQuery(" Select c from Customer c where c.identifier=:id", Customer.class).setParameter("id", ident).getSingleResult

selective update not working

we try to optimize for our queries and tried a selective update, but in explorer it just shows query execution error:   UPDATE ObjectNode o SET o.state = 5 where o.classIdentifier = '(MA)' and o.objectNameUpper = 'DMU200P2' and o.state = 0 and o.type = 1 and o.parentNode.classIdentifier

InterfaceRef jakarta.persistence.criteria.CriteriaBuilder

JPA Interface CriteriaBuilder Used to construct criteria queries, compound selections , expressions ... Return: any expression Since: JPA 2.0 CompoundSelection array (List   selections ) Create an array-valued selection item. Parameters: selections - list of selection items Return: array-valued

InterfaceRef jakarta.persistence.criteria.CompoundSelection

JPA Interface CompoundSelection Type Parameters: - the type of the selection item Super Interfaces: Selection , TupleElement The CompoundSelection interface defines a compound selection item (a tuple, array, or result of a constructor). Since: JPA 2.0 Public Methods Selection alias (String 

InterfaceRef jakarta.persistence.criteria.CriteriaQuery

Since: JPA 2.0 Selection getSelection () Return the selection of the query, or null if no selection has been set. Return: selection item Inherited from: AbstractQuery Since: JPA 2.0 CriteriaQuery ... : the modified query Since: JPA 2.0 CriteriaQuery select ( Selection   selection ) Specify the item

InterfaceRef jakarta.persistence.Query

language SELECT statement or for a criteria query TransactionRequiredException ... language SELECT query or a {@link jakarta.persistence.criteria.CriteriaQuery} query Since: JPA 2.0 int ... () Execute a SELECT query and return the query results as an untyped List. Return: a list of the results, or

InterfaceRef jakarta.persistence.TypedQuery

: IllegalStateException - if called for a Jakarta Persistence query language SELECT statement or ... SELECT query or a {@link jakarta.persistence.criteria.CriteriaQuery} query Inherited from: Query ... getResultList () Execute a SELECT query and return the query results as a typed List. Return: a list

InterfaceRef jakarta.persistence.criteria.Subquery

JPA Interface Subquery Type Parameters: - the type of the selection item. Super Interfaces: AbstractQuery , CommonAbstractCriteria , Expression , Selection , TupleElement The Subquery interface defines functionality that is specific to subqueries. A subquery has an expression as its selection item

CriteriaQuery.multiselect(selectionList) - JPA Method

;List  selectionList ) Specify the selection items that are to be returned in the query result. Replaces the previously specified selection (s), if any. The type of the result of the query execution ... be a tuple- or array-valued compound selection item. The semantics of this method are as follows

AnnotationRef jakarta.persistence.EntityResult

with the SqlResultSetMapping or NamedNativeQuery annotation to map the SELECT clause of a SQL query to an entity result. If this annotation is used, the SQL statement should select all the columns that are mapped ... .createNativeQuery( " SELECT o.id, o.quantity, o.item, " + "i.id, i.name, i.description " + "FROM Order o, Item i

AnnotationRef jakarta.persistence.ColumnResult

with the SqlResultSetMapping , NamedNativeQuery , or ConstructorResult annotation to map a column of the SELECT list of a SQL query. The name element references the name of a column in the SELECT list — i.e ... this annotation in the metadata. Example: {@snippet : Query q = em.createNativeQuery( " SELECT o.id AS

InterfaceRef jakarta.persistence.EntityManager

query language named query. The select list of the query must contain only a single item ... of type Object if there is only one column in the select list.) Column values are returned in the order of their occurrence in the select list and default JDBC type mappings are applied. Parameters

AbstractQuery.getSelection() - JPA Method

JPA Method in jakarta.persistence.criteria.AbstractQuery Selection getSelection () Return the selection of the query, or null if no selection has been set. Return: selection item Since: JPA 2.0

InterfaceRef jakarta.persistence.criteria.AbstractQuery

affect the query. Return: the set of query roots Since: JPA 2.0 Selection getSelection () Return the selection of the query, or null if no selection has been set. Return: selection item Since: JPA 2.0

Step 5: Add a JSP Page

In this step we will add the JSP that generates the guestbook page output: Open the [New JSP File] dialog box by right clicking the WebContent node (in the [Package Explorer] window), selecting New Other... Web JSP File and clicking Next . Enter guest as the jsp file name - use exactly

Step 4: Add a Servlet Class

In this step we will add a servlet to manage guestbook web requests: Open the [Create Servlet] dialog box by right clicking the guest package node (in the [Package Explorer] window), selecting   New Other... Web Servlet and clicking  Next . The Java package name should be guest. Enter

AnnotationRef jakarta.persistence.NamedNativeQuery

, for example: @NamedNativeQuery( name = "findWidgets", query = " SELECT o.id, o.quantity, o.item ... ;OrderItems", query = " SELECT o.id, o.quantity, o.item, i.id, i.name, i.description " ... ;OrderItems", query = " SELECT o.id, o.quantity, o.item, i.id, i.name, i.description "

AnnotationRef jakarta.persistence.FieldResult

with the EntityResult annotation to map columns specified in the SELECT list of a SQL query to the properties or fields of an entity class. Example: {@snippet : Query q = em.createNativeQuery( " SELECT o.id AS order ... Name of the column in the SELECT clause - i.e., column aliases, if applicable. Since: JPA 1.0 String

InterfaceRef jakarta.persistence.StoredProcedureQuery

is found not to be a Jakarta Persistence query language SELECT query or a {@link jakarta ... is rolled back Since: JPA 2.1 Stream getResultStream () Execute a SELECT query and return the query ... to be a Jakarta Persistence query language SELECT query or a {@link jakarta.persistence.criteria.CriteriaQuery

AnnotationRef jakarta.persistence.ConstructorResult

with the SqlResultSetMapping or NamedNativeQuery annotation to map the SELECT clause of a SQL query ... : {@snippet : Query q = em.createNativeQuery( " SELECT c.id, c.name, " + "COUNT(o) as orderCount ... [] columns default null (Required) The mapping of columns in the SELECT list to the arguments

Path.get(attributeName) - JPA Method

); q. select (p) .where(cb.isMember("joe", p. get("nicknames" ... nicknames = p.get("nicknames"); q. select (p) .where(cb.isMember("joe", nicknames

AnnotationRef jakarta.persistence.JoinTable

foreign key strategy is selected by the persistence provider. Since: JPA 2.1 Index [] indexes default ... strategy is selected by the persistence provider. Since: JPA 2.1 JoinColumn [] inverseJoinColumns default

AnnotationRef jakarta.persistence.Cacheable

JPA Annotation Cacheable Target: TYPE Implemented Interfaces: Annotation Specifies whether an entity should be cached, if caching is enabled, and when the value of the persistence.xml caching element is SharedCacheMode.ENABLE_ SELECTIVE or SharedCacheMode.DISABLE_ SELECTIVE . The value

EnumRef jakarta.persistence.SharedCacheMode

. Since: JPA 2.0 DISABLE_ SELECTIVE Caching is enabled for all entities except those for which Cacheable ... ENABLE_ SELECTIVE Caching is enabled for all entities for which Cacheable(true) is specified

Which API should I use - JPA or JDO?

that are supported only by JDO.  Selecting the more popular API leads to more portable application