About properties

forum_thread

Does ObjectDB support @Parent for @Embeddable reference to parent?

AFAIK JPA does not directly support an @Embeddable referencing the parent in which it is @Embedded. But Hibernate has a special @Parent for it (see Entity extensions 2.4.3.4.@Parent). @Entity public class Person { @Embeddable public Address address; ... } @Embeddable public class Address { @Parent public Person owner; ... } Is there a safe and recommended way of achieving this in ObjectDB ? ... } }   // .. other properties .. } Visit ...

 
forum_thread

Entity listener - event instead of object

Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated entity. There is a problem however with accessing "old" version of object stored in database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains #1 2011-07-20 12:49 Hi, Currently I'm playing with entity listener to implement auditing with difference between values i ...

 
forum_thread

Setting temp directory location in ObjectDB

HI, I am using ObjectDB and would to change the temp directory location wihtout using objectDB.conf file. I am using JDO and setting the persistenceManager as follow properties.setProperty("javax.jdo.PersistenceManagerFactoryClass","com.objectdb.jdo.PMF"); properties.setProperty("javax.jdo.option.ConnectionURL", fileName.odb); pmf = JDOHelper.getPersistenceManagerFactory(properties), JDOHelper.class.getClassLoader()); #1 2011-08-02 15:49 HI, I am using ObjectDB and would to change the temp directory location wihtout using objectDB.conf fil ...

 
forum_thread

Duplicate Entity class names causes Exception in Query

I have two Entities which have the same class name but reside in different packages, only one of them is mentioned in the persistence.xml. I a NamedQuery I use the unqualified class name of one of these entities. If I execute that query I get an exception;   ... > objdbTest.Item </class > <properties > <property name = ... value = "admin" /> </properties > </persistence-unit >   ...

 
forum_thread

Error 363 - Failed to read value of inverse relationship

I've got two objects: @Entity public class EEvent { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @ManyToOne(optional=false) private ETown town; public ETown getTown() { return town; } public void setTown(ETown town) { this.town = town; } } And: ... ) { Map<String, String> properties = new HashMap<String, String> ( ) ; properties. put ( "javax.persistence.jdbc.user" , "admin" ) ; properties. put ( "javax.persistence.jdbc.password" , "admin" ...

 
tutorial

Step 6: Set the Spring XML

Explains how to set XML in a NetBeans Spring MVC JPA web application project. To integrate the Spring Framework into a web application we have to add the definition of the Spring dispatcher servlet to the web.xml configuration file and to configure that servlet using another xml configuration file. Open the web.xml ...

 
tutorial

Step 6: Set the Spring XML

Explains how to set XML in an Eclipse Spring MVC JPA web application project. To integrate the Spring Framework into a web application we have to add the definition of the Spring dispatcher servlet to the  web.xml configuration file and to configure that servlet using another xml configuration file. Open the  web.xml ...

 
api-jdo

javax.jdo.annotations.ForeignKey

Annotation for a database foreign-key.(Annotation of JDO)

 
forum_thread

Request clarification of changes to accessor enhancement policy (non-getter prefix instead of getter suffix) AND annotations

In response to the forum posting http://www.objectdb.com/database/forum/994 changes were made to the way enhancement treats getters and setters (property accessors), namely there are no longer enhanced additional getters/setters, because the additional methods now use (since about version 2-6-5) this pattern: __odbHidden_[accessor_name] Instead of this pattern with a suffix (preserving the method as a setter or getter), prior to version 2-6-5: #1 2016-08-20 13:44 In response to the forum posting http://www.objectdb.com/database/forum/994 changes were made to the way enh ...

 
forum_thread

Spring Transactions (@Transactional) within ObjectDB

Hi, We are using OBD with Spring and transactions are managed by Spring. Our spring service interfaces take list of objects and persist them and the interface service is marked as @Transactional. We iterate through the list apply business validations and persist them one by one in a loop. ( Using Spring Data) We have noticed that in a loop 1st object is persisted and then we if lookup the same object we don't get it back on lookup. ... data which does findbyCode where code is one of the entity properties. This was working well with ORM - Hibernate when used with ...