About SELECT

41-50 of 200Refresh
Forum
21

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
Forum
21

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) <= 1 which doesn't work: "Unexpected query token 'SELECT'". Does ObjectDB support queries like this? Thanks. Nested queries (issue #11) is currently not supported
Issue
21

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
Issue
21

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. Thank you for your report
Issue
21

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(); } catch (javax.persistence
Forum
21

Performance in SELECT statement

has around 30.000 rows) Example query looks like : String strSelect = "SELECT e FROM TestEntity
Issue
21

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 = '(NC
Tutorial
20

Step 1: Install BIRT and ObjectDB Driver

 Eclipse IDE for Java EE Developers environment: Open the [Install] dialog box by selecting Help ... Neon, Oxygen) and press ENTER. Click the Select All button to select all the BIRT features. Complete ... To install the ObjectDB data source driver for BIRT: Open the [Install] dialog box by selecting Help
Tutorial
20

Getting Started with JPA - Eclipse Project

: Select File > Import... > Maven > Existing Maven Projects and click Next. Select the points-console directory as Root Directory and press ENTER. Select the project and click Finish. Run the project in Eclipse: Right click the project node and select Run As > Java Application. Select Main - point and click OK.
Manual
20

JPA Named Queries

="SELECT c FROM Country c") The @NamedQuery annotation contains four elements ... class. But since the scope of named queries is the entire persistence unit, names should be selected ... ", query="SELECT c FROM Country c") public class Country { ... } Attaching multiple named