About size

forum_thread

"where in" query

Is it possible to run a query selecting values that exist in a provided list? e.g. something like: SELECT u FROM User m WHERE u.username IN ('test_user','anotheruser') I've tried various combinations of this including passing the list as a named parameter but without any joy. The only similar examples I can find in the docs involve a join query - but my list isn't in the database - and the MEMBER OF operator doesn't seem to do what I want (although I may be using it incorrectly! ... ; System. out . println ( "Result Size: " + results. size ( ) ) ;   em. close ( ...

 
forum_thread

No clue how to query with collection

Hi there! Actually, what I have is something like: @Embedable class Address { String getStreet(); int getStreetNo(); } @Entity class Contact { Collection<Address> getAddresses(); }   ... INNER JOIN c . addresses ORDER BY SIZE ( c . addresses ) > 0 ? CONCAT ( c . ... Maximum file size: 32 MB 0 ...

 
forum_thread

How to creat a Query with Sql which returns a List<Mark> marks

How can i get out of the db my Athlete Objekt his list<Mark> marks collection with a createQuery Sql-Statement. the Mark and Athlete Object do not really have a primary or secondary key together, the list mark is just stored in the athletes object, not as an embeddable but as an entity. ... ( ) ; if ( results. size ( ) == 1 ) { Mark dbMark = ... Maximum file size: 32 MB 0 ...

 
forum_thread

Wrong select results

Hello, I got a realy strange SELECT problem. In explorer query "select p  from Player p where p.confirmed==false", given me some results with p.confirmed==TRUE. And when I try to do (see image) "select p, p.confirmed  from Player p where p.confirmed==false", I getting p->confirmed->true and p.confirmed->false. How so? <odb v2.6.5_05> And this problem not only in explorer ... <database>   <size initial="1024kb" resize="1024kb" page="64kb" />   <recovery ... Maximum file size: 32 MB 0 ...

 
forum_thread

Possible Bug in MEMBER OF

Hello! I maybe found another bug in version 2.3.3. I'll send you a test DB via support ticket. Try the following query in explorer: SELECT u FROM Unit u WHERE :user MEMBER OF u.users Set user to TrackerUser#8 If i run this quey i get: Invalid operand type at.co.pjm.tracker.persistence.TrackerUser for operator MEMBER OF SELECT u FROM Unit u WHERE :user MEMBER OF u. ==> users <== In my opinion the result should be Unit#4004 ... a temporary fix that makes your query work. Still SIZE and IS EMPTY are not supported yet and this should be fixed in future ... Maximum file size: 32 MB 0 ...

 
forum_thread

Can't get arraylist/vector type attributes

I have a class that contains some attributes of type Vector (also tried with ArrayList and same happens). When I try to get an object from that class doing using the find method it works fine, I get the object. But when I call the close method to close the EntityManager the information from the Vector dissapears and I get an empty vector. ... closing the entitymanager I write something like vector.size() or I print it's size or I do anything with the vector, after calling the close method the ...

 
forum_thread

Problem with queries on lists with reverse mapping

Hi, In version 2.4.2, when an object in a list is reversed mapped to the owning object, queries are returning objects of types that were not specified in the query.   In the attached example the last test fails because the query returns both TeamA and TeamB objects where only TeamA was specified in query. If the "team" is omitted from the player and targetEntity = Player.class, mappedBy = "team" are removed from Team the query returns the expected result.   ... ) ; assertEquals ( 1 , q7results. size ( ) ) ; It looks like the result is not ... Maximum file size: 32 MB 0 ...

 
forum_thread

Need disk usage and delete some old files

    Hello , is it possible to get disk usage of database ? If disk usage becomes too high , delete old date files from database. And recalculate disk usage back ?   ... database is a single file you can simply check its size using the length() method. In embedded mode this should be ... Maximum file size: 32 MB 0 ...

 
forum_thread

Listing large number of complicated objects with paging.

Hi, For last few hours I was working on a problem with bad performance and memory problems with such a simple query: select prod from Product prod order by prod.id ASC Right now I have 55541 'Product' (attached to this post) entities in database and I'm trying to speed listing them with paging. The problem is, that running code that looks like this: ... in newest (2.3.3_04) version is running with bigger heap size - now it's 384MB. I was trying to build wrapper object ... . println ( "Results: " + resultList. size ( ) ) ;   emf. close ( ...

 
forum_thread

Query by array element

Hello, I have a class as follows: @Entity public class MyEntity {     boolean properties[]= new boolean[1024]; } I would like to query objects with feature '42': select me from MyEntity me where me.properties[42]=true Is it possible? Thank you! ... ( query. getResultList ( ) . size ( ) ) ;   em. close ( ... Maximum file size: 32 MB 0 ...