About example

forum_thread

Multi selection and distinct in a criteria query

hi, How can I realize multi selection with the criteria api concerning distinct? I.e. doing something like SELECT DISTINCT $1, $2 wouldn't work because I do only have something like criteria.multiselect(...) and nothing like builder.distinct(selection) so that I could do something like criteria.multiselect(builder.distinct($1), $2)... ?? Alex #1 2012-01-17 00:00 hi, How can I realize multi selection with the criteria api concerning distinct? I.e. doing somet ...

 
forum_thread

Internal exception when updating date filed (TemporalType.DATE)

Hello! ObjectDB version 2.5.3_02. I get internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). ... 2 more My test example attached  Here is my output: run: Type not found ... regards, Alexander. example project (Netbeans 7.4, Java: 1.7.0_11) ... less than 1,000 users. I slightly changed my example to reproduce my issue (set timezone to "Europe/Moscow"). My ...

 
forum_thread

AttachNotSupportedException

Good morning, OS: Windows Server 2008 R2 64 bit Java: Java Server JRE 8u121 for Windows x64 ObjectDB: version 2.6.9 build 5 Problem description: ObjectDB server will start and function normally (?) but an exception is logged: "java.lang.NoClassDefFoundError: com/sun/tools/attach/AttachNotSupportedException" (see attachment to this thread). ... Also when we open a database from Explorer. An example db is in the attachment to this post. Could this have anything ... starting Java VM'. Example database edit ...

 
forum_thread

Problem with byte arrays in JDO - ClassCastException

A bizarre ClassCastException is thrown if I attempt to obtain a byte array field as the result of a Query: Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to [B at spiffy.test.ObjectdbTest.main(ObjectdbTest.java:44) ... . Query ; import spiffy. test . model . Example ;   /** * * @author steve */ public class ... Query query = pm. newQuery ( Example. class ) ; query. deletePersistentAll ( ...

 
forum_thread

Annotations not supported in -source1.3 (use -source 5 or higher ..)

objectdb-2.2.5_03 Netbeans IDE6.9.1 java version "1.6.0_24": as user running Netbeans java version "1.5.0_28": as su running maven mvn Maven version: 2.0.8 Firstly, I followed the instructions to build the points example from Maven, but on opening it in Netbeans 6.9.1 I got an error in Points.java and other files: Annotations not supported in -source1.3 (use -source 5 or higher ..) Generics not supported in -source1.3 (use -source 5 or higher ..) ... Firstly, I followed the instructions to build the points example from Maven, but on opening it in Netbeans 6.9.1 I got an error in ...

 
issue

InternalException when using MEMBER OF on a large list in a query

Hello, we get when executing a query with MEMBER OF on a large list the following InternalException: Caused by: com.objectdb.o.InternalException: merge2 com.btc.ep.coverage.bl.internal.dmos.CoverageRecordImpl:null => merger[2850057]-missing:223 at com.objectdb.o.PBI.B(PBI.java:124) at com.objectdb.o.PBI.q(PBI.jave:97) at com.objectdb.o.OBI.Vp(OBI.java:244) (... more see attached Image) Our query looks like this: ... I created (with a lot of effort) a 1-file example. I think it's best if you analyse the sample. The example works if you reduce the count (line: 31) to 20.000  or  if ...

 
forum_thread

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock exception of the removed entity. If this operations on the entity are executed in only one plugin, it works well. ... the issue is not occurred. I created an OSGi example for eclipse mars, with plugins com.btc.ep.base.dal.tests.it and ...     OSGi example edit ...

 
manual

Strings in JPQL and Criteria Queries

Explains string expressions in JPQL queries, including LIKE, LOCATE, LOWER, UPPER, TRIM, CONCAT and SUBSTRING.... always the pattern (usually a parameter or literal). For example: c.name LIKE '_r%' is TRUE for ... by an escape character, which is also specified. For example: '100%' LIKE '%\%' ESCAPE '\' ...

 
forum_thread

Update Entity references if we change the type of an entity

Hello, we must change (extend) our entity model and therefor we convert the type of some entities. As example (like in the attached example): We have an EntityA that have a reference to an EntityB. ... therefor we convert the type of some entities. As example (like in the attached example): We have an EntityA that have a reference to an EntityB. ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) ... Regards. test example many-to-many relationship User, Project, Assignement ...