Internal Website Search
101-150 of 200 resultsselecting 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) | |
orphanRemoval = true not working when CascadeType.REMOVE is disabledorphanRemoval = true not working when CascadeType.REMOVE is disabled | |
select query for a HashMap field of an entity.select query for a HashMap field of an entity. | |
Class fields selection to storeClass fields selection to store | |
selective update does not workselective update does not work | |
Selective merge/cascade of detatched entitySelective merge/cascade of detatched entity | |
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 | |
Setting and Tuning of JPA Queries.findAll", query =" SELECT c FROM Country c", hints ={@ QueryHint (name | |
JPA Query Expressions (JPQL / Criteria) Query expressions are the foundations on which JPQL and criteria queries are built. Every query consists of clauses - SELECT , FROM, WHERE, GROUP BY, HAVING and ORDER BY, and each clause consists of JPQL / Criteria query expressions. Atomic Expressions The atomic query expressions are: JPQL | |
Literals in JPQL and Criteria Queries to enable selective retrieval by type . In JPQL an entity type literal is written simply as the name | |
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 to evaluate the different alternatives in order to select the best solution. | |
Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabledRemove of an entry from a @OneToMany collection is not possible if the enhancer is disabled | |
javax.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 groupBy ... Since: JPA 2.0 CriteriaQuery multiselect (List selectionList) Specify the selection items | |
Step 5: Add a JSP Page In this step we will add the JSP that generates the guestbook HTML output: Open the [New JSP File] dialog box by right clicking the WEB-INF node under the Web Pages node (in the [Projects] window) and selecting New JSP ... Enter guest as the jsp file name - use exactly that case sensitive class | |
Step 4: Run the Application You can run the application now by right clicking the Main node (in the [Projects] window) and selecting Run File . The expected output in the [Output] window, is: Total Points: 1000 Average X: 499.5 (0,0) (1,1) (2,2) (3,3) : : (998,998) (999,999) When you run the application for the first time | |
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) and selecting New Class . The package name should be guest . Enter GuestController as | |
Step 2: Define a JPA Entity Class To store objects in an ObjectDB database using JPA we need to define an entity class: Right click on the project in the [Package Explorer] window and select New Class . Enter tutorial as the package name (case sensitive). Enter Point as the class name (case sensitive). Click Finish to create | |
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 6: Run the Java EE 6 Application You can run the application now by right clicking the GuestServlet node (in the [Project Explorer] window) and selecting Run As Run on Server Finish : Since we are using ObjectDB in embedded mode - the database file is created under the GlassFish directory (e.g. at domains\domain1\eclipseApps | |
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 Web Pages node (in the [Projects] window) and selecting New JSP ... Enter guest as the jsp file name - use exactly that case sensitive class name. Click Finish | |
Step 4: Run the Application You can now run the application by right clicking the Main.java file (in the [ Package Explorer ] window) and selecting Run As Java Application . The expected output in the Eclipse [Console] window, is: Total Points: 1000 Average X: 499.5 (0,0) (1,1) (2,2) (3,3) : : (998,998) (999,999 | |
Step 6: Run the Web Application You can run the application now by right clicking the GuestServlet node (in the [Project Explorer] window) and selecting Run As Run on Server Finish : Since we are using ObjectDB in embedded mode - the database file is created under the Tomcat directory. You can stop the Tomcat server and open | |
Step 3: Add a Main Class In this step we will add a main class to the project to store and retrieve Point objects from the database: Right click the tutorial package in the [Package Explorer] window and select New Class . The package name should be tutorial . Enter Main as the class name (case sensitive). Click Finish | |
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 [Projects] window) and selecting New Java Class ... Enter GuestController as the class name - use exactly that case sensitive class | |
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 project node (in the [Package Explorer] window) and selecting New Class . Enter guest as the package name - use exactly that case sensitive package | |
Step 6: Run the Java EE 6 Application You can run the application now by right clicking the GuestServlet node (in the [Projects] window), selecting Run File , and then clicking OK (no need to change the servlet execution URI). Since we are using ObjectDB in embedded mode - the database file is created | |
Step 6: Run the Web Application You can run the application now by right clicking the GuestServlet node (in the [Projects] window), selecting Run File , and then clicking OK (no need to change the servlet execution URI). Since we are using ObjectDB in embedded mode - the database file is created under the Tomcat directory | |
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 Web Pages node (in the [Projects] window) and selecting New JSP ... Enter guest as the jsp file name - use exactly that case sensitive class name. Click Finish | |
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 | |
Step 5: Add a JSP Page In this step we will add the JSP that generates the guestbook HTML output: Open the [New JSP File] dialog box by right clicking WEB-INF under src/main/webapp (in the [Package Explorer] window), selecting New Other... Web JSP File and clicking Next . The parent folder should be WEB-INF | |
Step 4: Add a Servlet Class In this step we will add a servlet to manage guestbook web requests: Open the [New Servlet] dialog box by right clicking the guest package node (in the [Projects] window) and selecting New Servlet ... Enter GuestServlet as the class name - use exactly that case sensitive class name. The Java | |
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 project node (in the [Projects] window) and selecting New Java Class ... Enter Guest as the class name - use exactly that case sensitive class name | |
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 | |
[ODB1] Chapter 6 - Persistent Objects one by one. If more selective retrieval is needed, a Query can be used to retrieve only objects | |
[ODB1] Chapter 8 - ObjectDB Server (what is known as "a man in the middle attack"). The server, on the other hand, might be less selective | |
Which API should I use - JPA or JDO? that are supported only by JDO. Selecting the more popular API leads to more portable application |