Re: ParseException in EJBQL statement with upper function

2010-01-21 Thread Andreas Hartmann
mail) LIKE '%no...@macbay.de%') Yes, I guess I'll transform all string literals to uppercase before executing the query. Thanks for the hint! Best regards, Andreas 2010/1/20 Andreas Hartmann Hi everyone, I'm taking my first steps with EJBQL. Can someone spot the er

Re: Create count(*) query based on SelectQuery

2010-01-20 Thread Andreas Hartmann
option. OK, thanks for your reply! I'm looking forward to 3.1 then :) Best regards, Andreas Andrus On Jan 20, 2010, at 6:10 PM, Andreas Hartmann wrote: Hi everyone, I'm mainly using SelectQuery queries, built using quite a complex programmatic infrastructure. But now

ParseException in EJBQL statement with upper function

2010-01-20 Thread Andreas Hartmann
tor(EJBQL.java:1911) at org.apache.cayenne.ejbql.parser.EJBQL.conditional_term(EJBQL.java:1776) at org.apache.cayenne.ejbql.parser.EJBQL.conditional_expression(EJBQL.java:1738) at org.apache.cayenne.ejbql.parser.EJBQL.where_clause(EJBQL.java:1585) at org.apache.cayenne.ejbql.parser.EJBQL.select_statement(EJBQL.java:69) Thanks a lot in advance! Best regards, Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Create count(*) query based on SelectQuery

2010-01-20 Thread Andreas Hartmann
(e.g. the likeIgnoreCase issue). Do I really have to build a string-based SQL or EJBQL query from scratch? Thanks a lot for any hints! Best regards, Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: Primary key generation in cluster (PostgreSQL)

2010-01-05 Thread Andreas Hartmann
Hi Andrus, Am 05.01.10 09:06, schrieb Andrus Adamchik: Yes, it is safe as long as the underlying DB guarantees atomic sequences. thanks a lot for your quick answer! Best regards, -- Andreas Andrus On Jan 5, 2010, at 1:35 AM, Andreas Hartmann wrote: Hi Cayenne community, I'm

Primary key generation in cluster (PostgreSQL)

2010-01-04 Thread Andreas Hartmann
by 20) and uses these 20 keys. So theoretically, no two Cayenne instances should ever use the same key. Is this assumption correct? Thanks a lot for any hints and best regards, -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: When can cached objects be garbage-collected?

2009-11-23 Thread Andreas Hartmann
or is there any other way to handle this issue? Do I have to create a new data context after the changes are committed, starting with a fresh RecipientSet? Thanks a lot in advance for any hints! Best regards, Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (

When can cached objects be garbage-collected?

2009-11-23 Thread Andreas Hartmann
there any other way to handle this issue? Do I have to create a new data context after the changes are committed, starting with a fresh RecipientSet? Thanks a lot in advance for any hints! Best regards, Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: Prefetching has no effect

2009-09-28 Thread Andreas Hartmann
Andreas Hartmann schrieb: Andreas Hartmann schrieb: I'm trying to get a large set of objects using prefetching. […] To me this looks like everything should be available after this query. Nevertheless, Cayenne issues additional queries when I access the RecipientField and Reci

Re: Prefetching has no effect

2009-09-27 Thread Andreas Hartmann
Andreas Hartmann schrieb: I'm trying to get a large set of objects using prefetching. […] To me this looks like everything should be available after this query. Nevertheless, Cayenne issues additional queries when I access the RecipientField and Recipient properties: Now t

Prefetching has no effect

2009-09-27 Thread Andreas Hartmann
text().performQuery(query); What could I be doing wrong? Thanks for any hints! -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: Obtain relationship target objects of a DataObject

2009-09-23 Thread Andreas Hartmann
Hi Andrus, thanks for your reply! Andrus Adamchik schrieb: On Sep 21, 2009, at 12:49 AM, Andreas Hartmann wrote: But apparently object.readProperty(…) doesn't return a list of the existing target objects. It does and the code looks correct to me. Doublecheck that "name" c

Obtain relationship target objects of a DataObject

2009-09-20 Thread Andreas Hartmann
(…) doesn't return a list of the existing target objects. What would be the correct way to do this? Thanks a lot in advance! -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: Memory and performance many new objects

2009-08-13 Thread Andreas Hartmann
Hi Andrus, Andrus Adamchik schrieb: On Aug 13, 2009, at 12:36 PM, Andreas Hartmann wrote: Of course I could commit the transaction each 1000 rows or so, but I'd rather commit the whole spreadsheet to the DB in a single transaction. You can use user-defined transaction scope,

Memory and performance many new objects

2009-08-13 Thread Andreas Hartmann
;col_100" so that I wouldn't need extra objects for the values. But this feels like a bad workaround. Of course I could commit the transaction each 1000 rows or so, but I'd rather commit the whole spreadsheet to the DB in a single transaction. Thanks a lot for any hints! --

[sorry for the OT mail] Re: Problem restoring dump with BLOBs

2009-07-27 Thread Andreas Hartmann
Andreas Hartmann schrieb: Hi everyone, to import a new version of the schema, I create and restore a dump as follows: Sorry for the noise, I accidentially posted to the wrong list. -- Andreas pg_dump --data-only --oids --file $dumpfile $db_name psql -1 […] $db_name < $schemafile psql

Re: PostgreSQL schemas for multi-tenant application

2009-07-27 Thread Andreas Hartmann
yenne 3.0 will be available this year? Our application shall go live in January, and since I'm not familiar with the Cayenne project yet I'm not sure whether the milestones should be used in production. -- Andreas mrg On Sun, Jul 26, 2009 at 10:51 AM, Andreas Hartmann wrote: A

Problem restoring dump with BLOBs

2009-07-27 Thread Andreas Hartmann
ds. Thanks a lot for any hints! -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01

Re: PostgreSQL schemas for multi-tenant application

2009-07-26 Thread Andreas Hartmann
Andreas Hartmann schrieb: Andreas Hartmann schrieb: Hi Cayenne users & devs, I'm currently designing the DB + ORM layer for a multi-tenant application, using PostgreSQL 8.3 and Cayenne 2.0.4. After some research it looks like PostgreSQL schemas are a pretty decent way to ac

Re: PostgreSQL schemas for multi-tenant application

2009-07-26 Thread Andreas Hartmann
Andreas Hartmann schrieb: Hi Cayenne users & devs, I'm currently designing the DB + ORM layer for a multi-tenant application, using PostgreSQL 8.3 and Cayenne 2.0.4. After some research it looks like PostgreSQL schemas are a pretty decent way to achieve the separation of the tenan

PostgreSQL schemas for multi-tenant application

2009-07-26 Thread Andreas Hartmann
DB level. Unfortunately, it looks like multiple schemas are not supported by Cayenne. Is this correct? If yes, what strategy would you recommend for the multi-tenancy? Do I have to resort to using a tenant ID column in the affected tables? Thanks a lot for any hints! -- Andreas -- Andreas Hartmann, CTO