About in

forum_thread

ID format in objectdb 2.x for JDOHelper.getObjectId

Hi, I am trying to upgrade the objectdb from 1.x to 2.x. I installed and configured as per object db tuotrial. I am just wondering, in objectdb 1.x, when i am tring to get the object id for a persistable object, i am getting an integer as a result e.g Object obj = JDOHelper.getObjectId(logTestRunImpl) used to return suppose 1 obj.toString() = 1 but the same code when i am trying to execute for the same object in object db 2.x, i am getting ... configured as per object db tuotrial. I am just wondering, in objectdb 1.x, when i am tring to get the object id for a persistable object, ... same code when i am trying to execute for the same object in object db 2.x, i am getting Object obj = ... Can you please let me know if there is any change in the JDOHelper.getObjectId method from object db 1.x to 2.x. And how can i ...

 
forum_thread

using objectdb.jar in writing data to mariadb or mysql db

Hello All, ... or php for the web version but i want to code queries in native java and reduce the use of regular sql patterns. Can my application ... to write to mariadb or mysql using native java JPA API and in some cases JPQL or must i store to an Objectdb unique database? Moreso, does ...

 
manual

[ODB1] Chapter 3 - Persistent Classes

Explains what a persistence capable class is and which types are supported by JDO.... are user defined classes whose instances can be stored in a database using JDO. Instances of these classes that represent objects in the database are called persistent objects or persistent instances . ...

 
forum_thread

@ElementCollection query returning extra result per element in collection

Hi, ... narrowing down an issue that only became apparent with in the UI. The issue is that, I'm getting repeated results of the owning ... The entity returned is repeated for every element in the collection. Switching back to EclipseLink (with the same code) yields ...

 
forum_thread

JDO @Index in JPA?

Hi! I have a project which has all entities as JPA entities. I would like to make use of indexing, which I know that it's not available in JPA, but ObjectDB works with JDO as well. Question1: will adding JDO @Index in a JPA entity have any effect or I have to switch that entity to JDO? Question2: switching entities from JPA to JDO can happen when there is already data in the database? Or do I have to delete the previous data and start with a fresh db? Thank you. ... use of indexing, which I know that it's not available in JPA, but ObjectDB works with JDO as well. Question1: will adding JDO @Index in a JPA entity have any effect or I have to switch that entity to JDO? ...

 
forum_thread

Visibility of changes in Transaction is not visible to a JPA QL Query

I have two simple Entities ( see attachment ) and a simple SLSB with container managed transactions which is called by a trivial servlet. Inside a UserTransaction I add a number of items then check to see that they have been added ...   The problem is that the items that I add in the transaction are not visible when I go to count them; ... EAR, and the persistence.xml is located where it is used in the EJB project ( this was the only way I could get things to work on ...

 
forum_thread

List of Enum Values in an entity

Hello, I'm new with ObjectDB and just tried out the example in the Eclipse/Glassfish tutorial (http://www.objectdb.com/tutorial/jpa/eclipse/ee). After testing was successful, I extended the Guest class with an ArrayList of Enums: private ArrayList<GuestFlag> flags; The flags are stored into the database without any problem. In the explorer I can see that it is stored as array of Strings. ... I'm new with ObjectDB and just tried out the example in the Eclipse/Glassfish tutorial ( ... flags are stored into the database without any problem. In the explorer I can see that it is stored as array of Strings. ... the entity is enhanced, you may see a  null value in the debugger before accessing the field, but when the field is accessed it ...

 
manual

[ODB1] Chapter 2 - A Quick Tour

Demonstrates basic database programming using ObjectDB. ... step by step. Both sample programs are contained in ObjectDB's samples directory. This chapter contains the following ... The HelloWorld sample program manages a list of strings in the database. Each time the program is run another string is stored in the ...

 
forum_thread

Wrong data stored in date only fileds

Hi, the following query returns records with startDate of 24/10/2015 before records with startDate of 25/10/2015: SELECT r from RecordingMetaData AS r ORDER BY r.startDate DESC, r.startTime DESC, r.channelNumber DESC If we place the same data in an SQL database and run the following query we get the records in the expected order, i.e. records with startDate of 25/10/2015 before records with startDate 24/10/2015: ... startDateTime ; // Time stamp: start of recording in local time zone private Date startDate ; // Date: ... clock goes back 1 hour at 3am), Object DB puts wrong data in the fields annotated with Temporal.DATE. The attached DB shows the ...

 
forum_thread

JPA JPQL WHERE clause for IN :variable not working if variable is a list of Enums

Hi, I have a case where I have a JPQL query like: "select o from MyEntity o WHERE (enumField IN :enumFieldList)" And enum field is defined in MyEntity as: @Enumerated(EnumType.STRING) @Column(nullable = false) @Index private MyEnumType enumField; And MyEnumType is defined as: public enum MyEnumType { VALUE1, VALUE2, VALUE3, VALUE4 } and I call: ... like: "select o from MyEntity o WHERE (enumField IN :enumFieldList)" And enum field is defined in MyEntity as: @ Enumerated ( EnumType . ...