- Copy attached DB into localhost ObjectDB server (I'm running 2.5.1_03).
- Open attached project JavaEE Maven with NetBeans (7.4 beta in my case).
- Start ObjectDB on localhost as server.
- Run project on Apache Tomee 1.5.2 standard.
- Take a look at NetBeans' output to see how many entities are found with field type GOOD.
There are 2 ways generate the bug:
- Immediately after a new number is printed in the console, open ObjectDB Explorer, modify an entity's type from GOOD to BAD, save the change, close ObjectDB's connection, and run the project again. Important: do all that until a new number is printed. There is a 1 minute delay set.
- The same as 1, but keep ObjectDB's connection open. In this case rerunning the project many times doesn't help at all.
Problem: the number of entities with field "type" GOOD found by the the NamedQuery does not correspond with the actual data present in the database. Query: "SELECT b FROM Bug b WHERE b.type = ?1" (param 1 is Bug.Type.GOOD)(type is Embedded(String))(see code)
Problem continuation: I've seen it behaving exactly opposite. So...it was like the query received Type.BAD as parameter.
This happens regardless of Type being an inner class or a standalone class.
Part-time solution: run the project twice after the modification. This doesn't do it for case Error scenario 2. Anyway, this screws up the production environment, because sometimes it doesn't work, but you don't know.
It's the second time when I encounter this bug in 2 different projects.
I would like so much to have this working properly.
BTW...Images are not loading on your website, making it very strange to use.