ObjectDB Database Search
51-100 of 200 resultsEclipse plugin problem (using ObjectDB as a separate bundle) Hello support, I have seen multiple attempts to correct similar errors as in the title ... , everything is persisted as expected - I used ObjectDB explorer to view my data. Now, any other attempt to persist ... on - including globally ( as in JDO) - see the manual . support Support Hello support, I am NOT using JPA | |
Object as parameter results in exception is valid since objects such as a Company instance are expected to be passed to the query as ... the primary key is used as a literal, which means that the query has to be compiled every time ... will be coded as Criteria queries. Willks William Your original post is of a great value | |
@MappedSuperclass and @Transient not working as I expected; But here is the problem: The base class of my entity hierarchy is annotated as @MappedSuperclass ... that should fix the transient field as well as the NPE. support Support So are the tables that appear ... superclasses ( as well as abstract entity classes) do not store data just schema. Usually data in | |
Type ... is not defined as an entity (@Entity is missing) (error 302).lab.data.bacti.CultureRqst is not defined as an entity (@Entity is missing) (error 302) at com ... projects to use objectdb. I tried placing objectdb as a variable and then all projects refer to this variable but then this does not work. The only solution it seems is to: 1. Package objectdb as | |
multiple LEFT JOINs do not work as expected.organisationId='root') OR ($4.organisationId='root'))) As I understand, since I use LEFT Joins ... return the organisations directly under root. The root organisation has null as it's parent. The log ... . Please try to modify it to demonstrate a different query that doesn't work as expected: import java.util | |
Access objectdb.conf as class loader resource Hi, is it possible configure ObjectDB so it searches the objectdb.conf file as a class loader ... at the expected path , then it is loaded as a resource from: META-INF/objectdb.conf Default configuration is included in objectdb.jar as a resource at that path. You may try putting your jar file | |
LAZY @ManyToOne field functions as EAGER closes and as expected both a LAZY @ManyToOne field and an EAGER @ManyToOne field are viewable: b ... , when it is marked as @ManyToOne(fetch=FetchType.LAZY) ? package com.greensoft.objectdb.test ... and ManyToOne relationships only in enhanced classes. If you run your test as recommended with enhancement | |
About LIMIT and OFFSET as query tokens Hi, I would like to know why the query tokens OFFSET AND LIMIT are not available and if they will be in a near future. Is there any equivalent way to get, from the database, the object at given position i as well as a given number of objects that follow such object? Thanks you in advance | |
starting objectdb as a service in linux Hi, how to start objectdb as a service from linux command line. Every time i close the terminal (putty) servers stops. Running it with the & parameter dont help. we are starting the database ... command or the start command? Using the start command it should start as a separate process. support Support | |
Insert time increases as db grows. the same results: insertion time grows as db grows. 4410 Arsenii I've just set enhancer as javaagent | |
ObjectDB as JDBC resource or custom realm it would be great if a realm like that came bundled with ObjectDB, possibly as an OSGi module. EDIT Is it possible to use ObjectDB as a JDBC Resource in GlassFish? That way maybe I could make JDBCRealm. Thanks in | |
Extended HashMap as Embeddable class Hi, Should it be possible to create an Embeddable class that extends HashMap (or Set etc.)? I can user HashMaps as parameter type in entities, but when I extend it and annotate it with @Embeddable annotation - I get an error. @Embeddable public class A extends HashMap { (...) }   | |
Using of ConcurrentHashMap as attribute holding a ConcurrentHashMap instance but it will be loaded as java.util.HashMap when the entity is retrieved from the database. support Support | |
InternalException - reporting as requestedInternalException - reporting as requested | |
JPA Query API with createQuery As with most JPA operations, queries start with an EntityManager (represented as em in the following code snippets). The EntityManager serves as a factory for both Query ... a TypedQuery instance, you must pass the expected result type as an additional argument, as shown for q2 | |
Entity Management Settings-dirty entities in the persistence context of the EntityManager , which serves as a first-level cache ... whether to enable lazy loading of entities content. Instantiating entities as hollow and loading ... (with a value of "true" or "false" ) specifies whether to use serialization as a fallback persistence | |
Schema Update refactoring. You specify only these schema changes in the configuration file. As explained in ... element demonstrates the supported schema update capabilities: The hierarchy, as demonstrated in ... is specified, a element serves as a container for child elements to rename classes and fields | |
Defining a JPA Entity Class Point class represents points in a plane. It is marked as an entity class, which enables you to store ... String toString() { return String.format("(%d, %d)", this.x, this.y); } } As the example shows, an entity ... , which marks the class as an entity class. If you try to persist Point objects without marking the Point | |
JPA Criteria Query Selection and Results, such as an entity, an attribute, or a computed expression. Because Selection is a superinterface ... ( CriteriaBuilder.tuple ). When compound selection results are returned as tuples: Represents ... ;the result as an array of objects or as individual values by index, alias string or | |
Online Backup Because an ObjectDB database is stored as a single file in the file system, you can back it up by ... that require continuous service (24/7), such as most web applications. Starting an online backup ... subdirectory with the same name as the original database file. For example, backing up a test.odb database | |
JPA Primary Key cannot be modified and represents the entity for as long as it exists in the database. As an object database ... . Only entities have primary keys. Instances of other persistable types are always stored as ... ; // still set automatically : } The @Id annotation marks a field as a primary key field | |
Database Replication and Clustering ObjectDB supports master-slave replication, also known as clustering. With replication, the same ... both read and write operations. The other nodes in the cluster, known as slave nodes, manage identical ... on a server can function as a master database in a cluster, but databases in embedded mode | |
Auto Generated Values fields ( as explained in the previous section ) and for primary key fields that are annotated ... and are never recycled, as explained in the previous section . The IDENTITY strategy The IDENTITY strategy ... ") @Id long id; } Unlike AUTO and IDENTITY , the SEQUENCE strategy generates a value as soon as a new | |
What is the Java Persistence API (JPA)?) is that in JPA data is represented by classes and objects rather than by tables and records as in ... database programming. A JPA implementation (sometimes referred to as a JPA provider) is needed in order to interact with a relational database such as Oracle, DB2, SQL Server or MySQL. The popular JPA | |
DELETE Queries in JPA/JPQL As explained in Chapter 2 , you can delete entities from the database by following these steps ... is a good practice. As with any operation that modifies the database, DELETE queries must be executed ... Country // no variable DELETE FROM Country c // an optional variable DELETE FROM Country AS c // AS | |
JPA Runtime Tuning & Configuration , RefreshOption . Pass as an argument to lock() , find() , or refresh() . Pessimistic lock scope ... PersistenceConfiguration.LOCK_SCOPE . Operation Implements: FindOption , LockOption . Pass as a variable argument ... (CacheRetrieveMode) Operation Implements: FindOption . Pass as a variable argument to find() . Cache | |
Obtaining a JPA Database Connection"); The createEntityManagerFactory static method expects a persistence unit name as an argument ... itself; that is the job of the factory, as explained previously. After an EntityManager object is closed ... resources (such as a database file pointer or a socket to a remote server) in a connection pool | |
JPA Components Annotations You can use Jakarta Persistence (JPA) annotations to mark classes as persistent and to configure ... class: Marks the class as an entity. Entities are persistent domain objects with a unique identity (primary key) and their own lifecycle. Marks the class as embeddable. Instances are stored as | |
Database Server embedded mode, ObjectDB is integrated as a library and runs within the application's process, which is more efficient. As a result, you should use embedded mode when possible. For example, if an ObjectDB ... is bundled in the objectdb.jar file. Run it from the command line as follows: $ java -cp objectdb.jar com | |
Database Transaction Replayer default, the recording directory is created in the same directory as the database file. If the purpose ... of a specific transaction. The transaction ID is used as the file name. A recording file ... file, such as my.odb in the example above. ObjectDB automatically locates the corresponding backup | |
Storing JPA Entities. getTransaction (). commit (); The Employee instance is constructed as an ordinary Java object ... of other persistable types can be stored in the database only as embedded objects in containing ... of persistable types other than entity classes are automatically stored as embedded objects in | |
JPA Attributes Annotations (Lazy/Eager) and nullability. Specifies a persistent field or property as an embedded attribute. The embedded state is stored in the same table as the owning entity. Specifies a collection field or property as an attribute containing a collection of embedded objects. This is used for "one-to-many | |
Is ObjectDB better than competing object databases? of the Java Data Objects (JDO) API than competing object databases. By using a standard API such as JPA ... relational database by using an ORM JPA provider such as Hibernate, EclipseLink or Open JPA. Another advantage of using a popular API such as JPA is the availability of experienced developers | |
JPA Metamodel Attributes: COLLECTION , SET , LIST , or MAP . Represents an attribute typed as a generic java.util.Collection . Represents an attribute typed as a java.util.Set , implying unique elements without a specific order. Represents an attribute typed as a java.util.List , supporting ordered collections and index-based | |
What are the main benefits of using ObjectDB?. Less (and more simple) code to write, debug and test, as well as a much easier learning curve leads ... fields can be stored by ObjectDB simply as part of the containing object. Relational databases lack ... multiple values (even for a simple data structure such as a collection of strings). In addition | |
Deleting JPA Entities or implicitly as a result of a cascade operation. Explicit remove To delete an entity from ... , which is also removed. Cascading can continue recursively to other referenced entities, such as any ... is automatically removed. This setting is useful for cleaning up dependent objects (such as Address | |
Chapter 6 - Configuration , lib , or build , its parent directory is the ObjectDB home directory ( $objectdb ). As a result ... ("objectdb.home", "/odb"); // new $objectdb As with any other system property it can also be set as ... "); It can also be set as an argument to the JVM: $ java "-Dobjectdb.conf=/my/objectdb.conf | |
Explorer bug ? Objects seem to be missing from database in Class view, but are present as references. It is marked knowingly as CRITICAL by me because it makes the ObjectDB system unusable for a real project ... it, which is just as bad. I attach a running project illustrating the problem, as well as screenshots ... carefully that its fields (such as name) are null, it is in fact a broken Project object (or looks | |
Unexpected query token - AS, artifact FROM com.btc.ep.engine.bl.internal.dmos.EngineInstanceImpl AS instance JOIN instance.artifacts AS instanceEntryArtifactSet , com.btc.ep.engine.bl.internal.dmos.ArtifactImpl AS artifact LEFT JOIN artifact.activatedGoals AS artifactActivatedGoals LEFT JOIN artifact.activatedAssumptions AS | |
Enhancer option -s works not as expected and Entity2 enhanced as expected. ... com.objectdb.Enhancer -noaware -s com.btc.base.* Entity1 and Entity2 enhanced as expected. BUT: ... com.objectdb.Enhancer -noaware -s com.btc.* Nothing enhanced ... . The enhancer supports specifying classes for enhancement either as packages and classes or as files | |
Eager Fetch of Map with Entities as Keys Loading eagerly a map that uses entity objects as keys is currently unsupported, if the equals and hashCode methods of the keys are based on the key entity persistent content, since that content ... .MST.aT(MST.java:522) at com.objectdb.o.MST. aS (MST.java:454) at com.objectdb.o.MST.U1(MST.java:427 | |
After using the enhancer, Lazy loaded collections are no longer loading. They are set as nullAfter using the enhancer, Lazy loaded collections are no longer loading. They are set as null | |
JPA Query Structure (JPQL / Criteria) ). The exceptions, where JPQL is case-sensitive, include Java source elements such as the names of entity classes ... : SELECT c FROM Country AS c This example demonstrates a minimal JPQL query because the SELECT and FROM clauses are mandatory. The FROM clause declares one or more query variables, also known as | |
Step 2: Entity Class and Persistence Unit , enter src/main/java as Folder Name and click Finish . Open the [New Java Class] dialog box, e.g. by ... ; New Class . Enter guest as the package name - use exactly that case sensitive package name. Enter Guest as the class name - use exactly that case sensitive class name. Click | |
Step 7: Run the Spring Web App the content of the index.jsp file (which serves as the default front page) with the following redirection to the controller path: If Tomcat 6.0 is installed as a server in your Eclipse -  ... ), selecting Run As Run on Server , selecting the Tomcat 6.0 server and clicking Finish | |
Step 4: Add a Controller Class) and selecting New Class . The package name should be guest . Enter GuestController as ... ); } } The GuestController class is defined as a Spring managed web controller using the @Controller annotation ... object defines a target JSP ( "guest.jsp" ) and passes the GuestDao component to the JSP as a request | |
Step 3: Define a Spring DAO Component) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right ... Java Class... . Enter GuestDao as the class name - use exactly that case sensitive class ... the controller, as shown in the next step. Prepares an EntityManager automatically and injects it into | |
Step 4: Add a Controller Class New Java Class ... Enter GuestController as the class name - use exactly that case sensitive class ... new ModelAndView("guest.jsp", "guestDao", guestDao); } } The GuestController class is defined as ... .jsp" ) and passes the GuestDao component to the JSP as a request attribute (whose name is "guestDao | |
Step 3: Define a Spring DAO Component) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right ... . The package name should be guest . Enter GuestDao as the class name - use exactly ... the controller, as shown in the next step. Prepares an EntityManager automatically and injects it into | |
Step 2: Entity Class and Persistence Unit Guest as the class name - use exactly that case sensitive class name. Enter guest as the package name ... with the following new content: com.objectdb.jpa.Provider Now ObjectDB should be used as a JPA provider |