ObjectDB Database Search

1-50 of 200 results

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

when ordering the results of some projection when the order by expression is different (though logically ... ;  + " order by s_location.id asc";         ... ;  + " order by s.location.id asc";        

ORDER BY problem, when String starts with language specific character

Dear all, I have a problem with ORDER BY clause. I have a simple query: select u from User u order by u.name When the name starts with "normal/english" character, records are ordered correctly ... ORDER BY clause. However, if you have to sort a large result list - it might be more efficient

JPA Lifecycle Events

annotation. By default, callback methods in a superclass are also invoked for entities of its subclasses ... attached to an entity class are inherited by its subclasses. To prevent this inheritance, add ... NoDefaultListenersForThisEntityEither extends NoDefaultListenersForThisEntity { } Callback invocation order When multiple callback

JPA Entity Fields

, you can set the order of the retrieved owner entities by using the @OrderBy annotation: @Entity ... Employee e WHERE e.department = :d ORDER BY e.name The specified field ( "name" ) must be a sortable ... and final entity fields are always considered transient. You can declare other fields as transient by using

Multi threading on DMOs by lazy loading

It is possible to use lazy loading on fields of attached entities by several threads? Example: class EntityZ { @OneToOne(fetch = FetchType.LAZY) EntityX fieldX; @OneToOne(fetch = FetchType.LAZY ... fieldX by lazy loading. Thread2 access fieldY by lazy loading. Thread3 access list by lazy loading

find out if an entity is refered by other entities

Hello, it is possible to find out if a child entity is just referenced by other parent entity types. But the types of the parent entities are unknown. Is there a possibility to find out if an entity is referenced? best regards btc_es BTC EmbeddedSystems You can only find it (using a query

Bug: ClassCastException by retrieval

tn3 = em.find(tNode.class, 1);   System.out.printf("find by retrieval : %s %n",tn3.getTa

java.sql.Time field off by 30 minutes

java.sql.Time field off by 30 minutes

jakarta.persistence.EntityManager

. The resultClass arguments must be specified in the order in which the result sets is returned by the stored ... arguments must be specified in the order in which the result sets is returned by the stored procedure ... via a call to close , to allow resources to be cleaned up by the persistence provider. This approach places

jakarta.persistence.ColumnResult

can be included in the query result by specifying this annotation in the metadata. Example: Query q = em.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "i.name AS item_name, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25

Apache License, Version 2.0, January 2004

the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright ... and all other entities that control, are controlled by , or are under common control with that entity

jakarta.persistence.ConstructorResult

annotation in the same order as that of the argument list of the constructor. Any entities returned as ... , " + "COUNT(o) as orderCount, " + "AVG(o.price) AS avgOrder " + "FROM Customer c, Orders o " + "WHERE o.cid = c.id " + "GROUP BY c.id, c.name", "CustomerDetailsResult"); @SqlResultSetMapping( name

jakarta.persistence.JoinColumn

Customer class @OneToMany @JoinColumn(name = "CUST_ID") // join column is in the table for Order public Set getOrders() { return orders ; } See Also: ManyToOne OneToMany OneToOne JoinTable ... Persistence (JPA) 1.0 String referencedColumnName (Optional) The name of the column referenced by

Database Management Settings

for each new database file. The resize attribute specifies the size by which to extend the database ... can improve performance by reducing file fragmentation that can result from frequent resize operations ... environments. By default, the recovery file is created in the same directory as the database file

[ODB1] Chapter 6 - Persistent Objects

, sophisticated queries. The results can also be sorted by specified order expressions. Chapter 7 is devoted ... When a new object is constructed by the new operator, it always starts as a transient object, regardless of its type. Instances of persistent classes can become persistent later, as demonstrated by

jakarta.persistence.Index

is given by the following simple BNF: column_list ::= index_column [, index_column]* index_column ::= column_name [ASC | DESC] If neither ASC nor DESC is not specified, ASC , that is, ascending order ... : "" Since: Jakarta Persistence (JPA) 1.0 String columnList (Required) The columns included in the index, in order

jakarta.persistence.EntityResult

.description " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i.id)", "OrderItemResults ... .acme. Order .class), @EntityResult(entityClass = com.acme.Item.class) } ) See Also: SqlResultSetMapping ... by the SQL query. Default: LockModeType.OPTIMISTIC Since: Jakarta Persistence (JPA) 3.2 FieldResult

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering Returns: ascending ordering corresponding to the expression. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering Returns: descending ordering

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering

jakarta.persistence.FieldResult

.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25) AND ( order _item = i.id)", "OrderResults ... . Order .class, fields = { @FieldResult(name = "id", column = " order _id"), @FieldResult(name = "quantity

Storing JPA Entities

Using Jakarta Persistence (JPA) You can store new entities in the database either explicitly by ... . The exception is thrown either by persist , if the existing entity is currently managed by the EntityManager , or by commit . Referenced embedded objects The following code stores an Employee instance

SELECT clause (JPQL / Criteria API)

query returns Country objects, which then become managed by the EntityManager instance em : TypedQuery ... directly. However, you can add their content to the SELECT clause by using a bound JOIN variable in ... with the containing entities. Therefore, embedded objects that are retrieved directly by a result path expression

Setting and Tuning of JPA Queries

method specifies the starting point of the result window by defining how many results to skip from ... because the setter methods in Query and TypedQuery support method chaining by returning the query object on which they were invoked. Flush mode (setFlushMode) Changes made to a database by using an EntityManager

Database Transaction Replayer

files). Recording is disabled by default and can be enabled in the configuration . The ObjectDB Replayer ... . This feature is useful for two purposes: Recovering from a database failure by replaying the recorded operations. Reproducing problems during debugging by repeating a failure. Recording transactions

JPA Named Queries Annotations

of the ObjectDB Manual. Query references Access named queries in the application by name or by using ... . Retrieve it by result type from EntityManagerFactory.getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery .

InternalException caused by OOM: Metaspace

.5_05] Unexpected exception (Error 990)   Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 ... ) and the next part: Caused by : java.lang.OutOfMemoryError: Metaspace at java.lang.ClassLoader

JPA Criteria Query Expressions

expression handling by using a minimal set of reusable interfaces, so many different types of expressions are represented by the same Expression interface.  Core expressions The following interfaces

Server Configuration

The configuration element specifies settings for running an ObjectDB Server . The server is also affected by other elements in the configuration file, such as the and elements. The default ... server. Every database file in the data directory and its subdirectories can be accessed by the server

ObjectDB 1.0 Manual

technology by Sun Microsystems. The main purpose of this guide is to familiarise you with ObjectDB ... class is and which types are supported by JDO. Chapter 4 - JDO Metadata Shows how to define JDO ... (SQL, JDBC or JDO) is not required in order to follow this guide, but a strong background

jakarta.persistence.EntityManagerFactory

of EntityManager . A persistence unit defines the set of all classes that are related or grouped by ... may be defined by a persistence.xml file, or it may be defined at runtime ... . An EntityManagerFactory with a lifecycle managed by the application may be created using the static operations

jakarta.persistence.Entity

type maps to a single column in one of the tables mapped by the entity, a field of property of embeddable type has nested mappings to multiple columns in one of the tables mapped by the entity ... to a foreign key column or columns in one of the tables mapped by the entity

Report Generation with BIRT and JPA

This tutorial demonstrates how to create reports based on data in an ObjectDB database using the popular open source Business Intelligence and Reporting Tools (BIRT). In order to keep things as simple as possible - we will use the basic  points.odb ObjectDB database file from the Getting

jakarta.persistence.MapKeyJoinColumn

) The name of the column referenced by this foreign key column. The referenced column is in the table ... (Optional) Whether the column is included in SQL INSERT statements generated by the persistence ... ) Whether the column is included in SQL UPDATE statements generated by the persistence provider. Default: true

jakarta.persistence.EntityGraph

the name of a named EntityGraph (an entity graph defined by means of the NamedEntityGraph annotation, XML descriptor element, or added by means of the EntityManagerFactory.addNamedEntityGraph method ... of this call may be overridden by subsequent invocations of Graph.addAttributeNode or Graph.addSubgraph

combined index not used

have to try different query plans by running them in the background in order to optimise and select best ... .parentNode.classIdentifier = "(ME)" order by o.parentNode.modified desc database can be downloaded ... it :) hgzwicker Hans-Georg Zwicker Excellent. Note that by knowing your data and ordering the variables

jakarta.persistence.InheritanceType

, with only the columns mapped to persistent fields and properties declared by the entity class. Each ... represented by a row is determined by the value held by a discriminator column . Since: Jakarta Persistence

jakarta.persistence.MapKeyColumn

to only a single column. This constraint applies in addition to any constraint entailed by primary key mapping ... statements generated by the persistence provider. Default: true Since: Jakarta Persistence (JPA) 1.0 boolean updatable (Optional) Whether the column is included in SQL UPDATE statements generated by

jakarta.persistence.NamedAttributeNode

of this element is the name of the subgraph as specified by the name element of the corresponding NamedSubgraph element. If multiple subgraphs are specified due to inheritance, they are referenced by ... subclass subgraphs. The value of this element is the name of the key subgraph as specified by

Step 5: Add a JSP Page

] dialog box by right clicking the WEB-INF node under the Web Pages node (in the [Projects] window ... , which contains a simple form for signing the guestbook, followed by a list of all the guests that have already signed (which are retrieved from the request's guestDao attribute that is set by

Step 2: Entity Class and Persistence Unit

the [New Java Class] dialog box, e.g. by right clicking the project node (in the [Package Explorer] window ... + ")"; } } The Guest entity class will represents guests in the database. We also need to configure JPA by setting a META-INF/persistence.xml file: Open the [New Folder] dialog box, e.g. by right clicking the project

Eclipse/JPA Spring MVC Web Tutorial

a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a  Guest JPA entity and all the  Guest entities

Step 4: Run the Application

You can run the application now by right clicking the Main node (in the [Projects] window ... 1,000 objects. You can view the content of the database file by opening it in the ObjectDB Explorer : This is the end of the tutorial. Learn more about ObjectDB and JPA by reading the Manual .

JPA Web App Tutorial - Maven Project

The  JPA Web Application tutorial provides step by step instructions on how to build a simple ... . Building a new application step by step is an effective way to learn - but if you prefer ... ) If  Maven is installed - extract the zip and run the application from the command line by

Spring MVC and JPA Tutorial

a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. All visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor

Step 4: Add a Controller Class

In this step we will add a Spring Controller to manage guestbook web requests: Open the [New Java Class] dialog box by right clicking the guest package node (in the [Package Explorer] window ... . A GuestDao component is automatically constructed and injected by Spring into the guestDao field

Step 6: Set the Spring XML

editor ( by right clicking and selecting  Open With Text Editor or by double click

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Java Class] dialog box, e.g. by right clicking the tutorial package node (in the [Projects] window) and selecting New Java Class ... Enter Point as the class name - use exactly that case sensitive

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