About example

forum_thread

Calendar in Criteria Querys

Hi, i am having troubles creating criteria querys for Calendar objects. As far as I can see CriteriaBuilder has no methods for checking if one Calendar is bevor or after another. Javas Calendar Class got such methods, but i dont know how to use those in my query. ... may have some limitations. Anyway, the following example demonstrates criteria queries with Calendar . The usual comparison ... Notice that Calendar values are stored in this example as Timestamp and consequently the query parameter is defined ...

 
forum_thread

Internationalization

What would be a good way to implement internationalization with ObjectDB? Let's say we do have a product catalog and we need to provide category and product data internationally. With a relational database we most probably would have two tables, one for locale neutral information, i.e. Product with fields SKU, price, etc. and another one for locale information only, i.e. ProductLocale with fields name, description, etc. ... map entry for each locale, then we could call a method for example like getName("en") and it would return the map entry for the english ... each with several multi-language members where for example the long description would be even stored as a rather long HTML code, ...

 
forum_thread

Performance in large transactions

Hello, we have a performance problem when we use a large transaction. Let's do exactly the same in several transactions the ObjectDB works much faster. In our use case, we create many new entities and between the creations we call a select query. The execution of the query becomes slower at each iteration. (In the query, we search for an item of type Entity2. However, there is only one entity.)   Pseudocode for the fast and the slow solution FAST: ... 07:54 Now we have an example that illustrates the behavior. 1) Import all Eclipse ... example_memory.zip edit ... 15:40 Attached a new Example in single class format:   import java. util . ...

 
forum_thread

Problem with @OrderBy

When I use @OrderBy and supply multiple order fields I get and error when ObjectDB loads that entity. Example code: @Entity @Table(name="Problems", schema = myDB") public class Defects  implements Serializable { ... ...  @OneToMany(mappedBy="problem") @OrderBy("seqRel, noteSeq") Set<Notes> notes; ... ... } ... Explorer expands a instance of the entity. Example code: @ Entity @ Table ( name = ... error seems to be the second field "noteSeq" in the above example is referenced as if it were an entity instead of a field of an entity. ...

 
forum_thread

Missing Data on Retrieval (0, null values)

I try  to export all Objects in an Flatfile-Hiearchy (.csv). But only the first exported Table contains all necessary Data. Most of the others  contains all  Object-Rows', but most Values of the Columns are missing. With a  em.clear() inside the Loop, all tables are exported correctly but the Enity-Keys do not match. I can't get the point - what am i doing wrong?   emf = Persistence.createEntityManagerFactory(dbFile); em = emf.createEntityManager(); ... without any Export-Function. A little Example: First try: List<Object> resultList1 = ... your first reflection operation. This could be done, for example, by accessing a persistent field directly (with no reflection) from an ... (if it is not very large) by changing your design. For example, using one entity class with various parameters (including map of ...

 
doc

java.lang.Exception

The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.(Exception of java.langException Exception)

 
forum_thread

Non Embedded byte[]

I am trying to understand the "embedded=false" for JDO byte[] as described in ObjectDB 1.0 Manual, sections 4.3 and 4.4.   I desire to store an image as a byte[] but I don't want the byte[] to be loaded on the loading of the persistent object that has my image's attributes.  The byte[] would only be loaded from the datastore if my image's attribute evaluation deemed that it need to be loaded.   Can you give a JDO example of how to achieve this?   For example: ... be loaded.   Can you give a JDO example of how to achieve this?   For example: @ PersistenceCapable   class MyImage ...

 
forum_thread

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) List<A> aClasses; } Now, I want to fetch all B classes with all A classes skipping lazy loading: ... cases: 1. When not using mappedBy, like in example above, detached objects are visible even after closing em. 2. ... are not visible. I should add mappedBy in the example above, but I totally forget about it. Anyway mappedBy shouldn't ...

 
issue

NullPointer when accessing persistent field

I am afraid this is a large and complex example, and I do not encounter the problem in simple cases, therefore there is no example attached. I appreciate this may make the bug unreproduceable from your end.   ... I am afraid this is a large and complex example, and I do not encounter the problem in simple cases, therefore there is no example attached. I appreciate this may make the bug unreproduceable from your ...

 
forum_thread

Find the error...JPA ENTITY HIBERNATE

Hey guys....i am searching for some days for the problem...Maybe one of you can find the error   DATABASE SHEMA: https://www.file-upload.net/download-12530779/2017-06-0214_25_00-MySQLWorkbench.png.html       Entities:   ... Entities:   package com. example . demo ;   import java. io . Serializable ; ...     package com. example . demo ;   import java. util . Set ;   ...