About find

forum_thread

How prevent post-compile enhancement of non entity classes

I have recently moved to post-compile enhancement (from automatic run-time enhancement) using an Ant build.xml for a NetBeans web app. My adapted build.xml works for both full project build and per-file compilation (with NetBeans "compile on save" off), but it is not yet perfect at only invoking the enhancer on entity files. For full project build the following works, by grouping entities under clearly named packages: ... could select on files containing @entity, but I can't find how to combined <fileset> with the <java> task (in this case I ...

 
tutorial

Step 7: Run the Spring Web App

Shows how to run the NetBeans Spring MVC JPA web application.... enable on the fly enhancement (weaving) in Tomcat: Find the Tomcat server in the [Services window] under Servers. Right click ...

 
forum_thread

remove() and persist() in same transaction => Attempt to reuse an existing primary key value

Hello Support, in our configuration (FlushModeType.AUTO) is the execution of  em.find(Entity.class, <id>) much faster than an equivalent query. To optimize the Performance we define a special Entity (A) with additional data that use an existing ID of another Entity (B) from another class (another table). On this point we get no conflicts. If we remove additional data for Entity (B) and then the special Entity (A) is empty, we remove the special Entity (A). ... (FlushModeType.AUTO) is the execution of  em.find(Entity.class, <id>) much faster than an equivalent query. To ... ( ) ; EntityA persitedEntity = em. find ( EntityA. class , 1 ) ; em. remove ( ...

 
forum_thread

Undeployment of an remote Glassfish application locks objectdb log file

System: Netbeans 7.1 Oracle Glassfish 3.1.2 ObjectDB 2.3.7_04 Senario: Create a simple WebApplication with a "hello world" web service interface in Netbeans. Add objectDB test code to the web service: ... "domain1\applications" folder on the Glassfish server and find that the WebApplication is still there. If you try to manually delete ...

 
forum_thread

@ElementCollection Set<Integer> is emptied sometimes

Hi! I'm facing a really strange behavior, which I can't yet reproduce, but it happened 3-4 times already. ObjectDB seems to clear some fields that are @ElementCollection Set<Integer> of my objects. They appear HashSet<Integer> in ObjectDB Explorer. The only common thing I've seen is that this MAY happen when schema changes, even though nothing is changed in that Object's class. Any ideas why would this happen and how could it be avoided? Thanks (version 2.5.3 & Tomee & NetBeans) ... into that class. It's very strange and I can't find yet a way to understand it. Initially, I was not using ...

 
faq

Is ObjectDB better than competitive object databases?

... minimizes the risk that during development you may find that an essential feature is missing. For example, some competitive ...

 
forum_thread

Source not found error after downloading ObjectDB 2.3.7_04

Code snippet: Properties prop = new Properties(); prop.setProperty("javax.jdo.PersistenceManagerFactoryClass","com.objectdb.jdo.PMF"); prop.setProperty("javax.jdo.option.ConnectionUR","local.odb"); PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(prop); PersistenceManager pm = pmf.getPersistenceManager();   I am getting an error Source attachment does not contain source for File PMF.class. ... from PMF.java and in the source file I am not able to find any PMF.java class.   For setup I downloaded the ...

 
forum_thread

Entity factory

Hi, is it possible to create Entities with a custom factory? I want to create Entity instances via dependency injection like: ... using JDO: EntityManager em = // find the EntityManager that manages this ( ...

 
forum_thread

How to Use a SF with extended Persistence Context?

Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. The need for an extended persistence Context emerges for the need to create queries in advance for fast execution so I need to store the queries and I need an EntityManager that doesn't get closed between calls. When I call the SF directly no problem happens but if I use SL to hold a reference to the SF I get com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active. #1 2013-11-24 06:05 Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. T ...

 
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) ... 7 64 bits. jdk1.6.0_27. ObjectDB doctor did not find any anormalie in the file I found the following log file: ...