Re: default values

2011-07-06 Thread Hans Pikkemaat
PS: I'm using cayenne 2.0.4 On 6/7/11 11:20 AM, Hans Pikkemaat wrote: Hi, I'm using a legacy database with old data. There are null values in fields which have a specific meaning. The legacy systems handle this in the code. In my new code I do not want to add such hardcoded ha

default values

2011-07-06 Thread Hans Pikkemaat
Hi, I'm using a legacy database with old data. There are null values in fields which have a specific meaning. The legacy systems handle this in the code. In my new code I do not want to add such hardcoded handling. I cannot update the fields because it will break old systems. My question: is

Re: flush cayenne config and connections

2011-03-21 Thread Hans Pikkemaat
());                 n.setDataSource(ds);             }         } This will recreate all datasources for all nodes in all domains. Is there an easier/better way? HPI On 3/21/11 3:12 PM, Hans Pikkemaat wrote: Hi, So this is what I do now right after repopulating the jndi

Re: flush cayenne config and connections

2011-03-21 Thread Hans Pikkemaat
asses I can reuse to load this information? I want to prevent manual ds reset/creation code in all my unit tests. tx Hans On 3/21/11 2:00 PM, Hans Pikkemaat wrote: Sounds good, is there a way to programmatically set my own DataSourceFactory before initializing cayenne? Or is the only way to set i

Re: flush cayenne config and connections

2011-03-21 Thread Hans Pikkemaat
your environment reset process. Andrus On Mar 21, 2011, at 2:12 PM, Hans Pikkemaat wrote: Hi, I have a unit test where I use jndi to determine my connection parameters. When I run one unit test which uses a specific jndi setup and it calls cayenne then all works fine (i use

flush cayenne config and connections

2011-03-21 Thread Hans Pikkemaat
Hi, I have a unit test where I use jndi to determine my connection parameters. When I run one unit test which uses a specific jndi setup and it calls cayenne then all works fine (i use org.apache.cayenne.conf.JNDIDataSourceFactory) I then clear my jndi container and repopulate it with differen

Re: transactions vs iterated query

2011-01-06 Thread Hans Pikkemaat
other example with the exception? Is there a way to call the close method on the result iterator without exposing the ResultIterator to the calling party? tx Hans On 1/6/11 10:08 AM, Andrus Adamchik wrote: On Jan 6, 2011, at 10:48 AM, Hans Pikkemaat wrote: One library calls the other one. The

Re: transactions vs iterated query

2011-01-06 Thread Hans Pikkemaat
nks without committing a DB transaction, you can still do it by temporary re-bidning your own transaction to the current thread for the duration of commit, and then restoring it to the iterated query transaction when update is done. Andrus On Dec 29, 2010, at 3:25 PM, Hans Pikkemaat wrote: Hi,

transactions vs iterated query

2010-12-29 Thread Hans Pikkemaat
Hi, I'm using an iterated query to process a huge amount of data which cannot be loaded at once. This query creates its own transaction and binds it to the current thread. This means that when I process the data I received from the iterated query all queries use the transaction created by the

Re: refreshing prefetched objects.

2010-09-08 Thread Hans Pikkemaat
Hi, This seems to be an issue in cayenne 2.0.4. In 3.0 it works fine. There are reasons why I cannot simply upgrade to 3. Is there a work around for this problem to get it to work in cayenne 2.0.4? tx Hans On 9/8/10 10:31 AM, Hans Pikkemaat wrote: Hi, I did not explain my test case in

Re: refreshing prefetched objects.

2010-09-08 Thread Hans Pikkemaat
ss.DataNode.performQueries(DataNode.java:273) ... 13 more What am I doing wrong? tx Hans On 9/7/10 4:23 PM, Hans Pikkemaat wrote: Indeed very strange. I'm trying to reproduce now using a simple table structure but here it works fine. If I find something I'll let you know. Han

Re: refreshing prefetched objects.

2010-09-07 Thread Hans Pikkemaat
Indeed very strange. I'm trying to reproduce now using a simple table structure but here it works fine. If I find something I'll let you know. Hans On 9/7/10 4:06 PM, Andrus Adamchik wrote: Very strange. Prefetching always refreshes related objects. Andrus On Sep 7, 2010, at 7:5

refreshing prefetched objects.

2010-09-07 Thread Hans Pikkemaat
Hi, I'm running a SelectQuery where I'm using a joint prefetch. query.addPrefetch(...).setSemantics(PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS); I turned caching off. query.setCachePolicy(QueryMetadata.NO_CACHE); If I now run the query twice then the prefetched objects are not refres

Oracle Sequence Usage

2010-08-23 Thread Hans Pikkemaat
Hi, I will explain my issues using an example. issue 1) I'm using cayenne 3.0 in combination with an Oracle 10.2 database. I have 2 tables A and B. There is no relationship between the tables. I want to store the primary key value of A in B but I don't want to create it a a field in A. Becau

Re: Commit performance degradation

2010-07-27 Thread Hans Pikkemaat
Hi, Can you add a link to the jira for reference? tx HPI On 7/27/10 10:01 AM, Cosmin Marian wrote: Thank you very much for the fix. I will download the code and put it to work (not waiting for 3.0.1 :) ) Cosmin Andrus Adamchik wrote:

Re: cayenne.xml not found

2010-07-26 Thread Hans Pikkemaat
Hi, I've seen this issue before with Eclipse. Sometimes it happens that resource files disappear from the classes directory. A clean project usually helps as this rebuilds the whole project (if autobuilding is on). tx HPI On 7/26/10 12:25 PM, masjab wrote: Ok, it´s working. The problem wa

Re: cayenne log4j configuration

2010-06-17 Thread Hans Pikkemaat
o 3.0. Andrus On Jun 17, 2010, at 11:25 AM, Hans Pikkemaat wrote: Hi, I'm using cayenne 2.0.4. and have my own log4j.xml configuration. My configuration does not have any appenders for the root logger. Looking at the isLoggingConfigured method in the Configuration class I see th

cayenne log4j configuration

2010-06-17 Thread Hans Pikkemaat
Hi, I'm using cayenne 2.0.4. and have my own log4j.xml configuration. My configuration does not have any appenders for the root logger. Looking at the isLoggingConfigured method in the Configuration class I see that cayenne assumes that log4j is not setup when the root logger does not have any a

notification of query

2009-12-29 Thread Hans Pikkemaat
Hi, I'm doing some performance tests and want to see when the query is actually run. I'm running some test queries with different cache settings to see what happens performance and memory wise. For this reason I need to know when an actual sql statement is being executed at the database. So my

Re: Retrieving Records for a range of primary keys

2009-12-17 Thread Hans Pikkemaat
tible with 2.0) 2009/12/17 Hans Pikkemaat but the ExpressionFactory doesnt have betweenDbExp. I'm using version 2 btw Andrey Razumovsky wrote: Yeah, for range you'll need betweenDbExp, I just got mistreated with analogue to paginated queries, which use in 2009/12/17

Re: Retrieving Records for a range of primary keys

2009-12-17 Thread Hans Pikkemaat
but the ExpressionFactory doesnt have betweenDbExp. I'm using version 2 btw Andrey Razumovsky wrote: Yeah, for range you'll need betweenDbExp, I just got mistreated with analogue to paginated queries, which use in 2009/12/17 Hans Pikkemaat Hi, I guess this produces the &#x

Re: Retrieving Records for a range of primary keys

2009-12-17 Thread Hans Pikkemaat
to go. See http://cayenne.apache.org/doc/path-expressions.html 2009/12/17 Hans Pikkemaat Hi, Some paginated mechanisms are based on a persistence layer to be able to retrieve records for a range of primary keys. I know it is possible to insert the primary key field in the definition but then I'm also req

Retrieving Records for a range of primary keys

2009-12-17 Thread Hans Pikkemaat
generator to determine the key value of a new record. So my question is: without having to insert the key field in the definition, is it possible to query the table by primary key range, and if yes, how? tx Hans Pikkemaat

Re: Object Caching

2009-11-13 Thread Hans Pikkemaat
data record you are using, but if it is even 1k (not an unreasonable size) it would require 2.5 GB of RAM just to hold the records. mrg On Fri, Nov 13, 2009 at 10:20 AM, Hans Pikkemaat wrote: Hi, That was the initial approax I tried. The problem with this is that I cannot manually create

Re: Object Caching

2009-11-13 Thread Hans Pikkemaat
ry time takes a while. mrg On Fri, Nov 13, 2009 at 7:09 AM, Hans Pikkemaat wrote: Anyway, my conclusion is indeed: don't use cayenne for large query processing.

Re: Object Caching

2009-11-13 Thread Hans Pikkemaat
s not give me a (n easy way to) handle to use it. This effectively leaves me running separate queries for each main record what is not performing. Anyway, my conclusion is indeed: don't use cayenne for large query processing. tx Hans Aristedes Maniatis wrote: On 13/11/09 10:0

Re: Object Caching

2009-11-13 Thread Hans Pikkemaat
query will take about 30 minutes. Construction of the objects will then take an extra hour. This is not really workable. Hans Hans Pikkemaat wrote: Hi, What I can see when I use paging in combination with SQLTemplate is this: Cayenne first runs the main SQLTemplate query which is stored in

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-13 Thread Hans Pikkemaat
ee if it works? 2009/11/11 Hans Pikkemaat Hi, This is the 'working' part System.out.println("Running with fetchlimit: " + pageSize); final DataContext dataContext = this.createDataContext(); SQLTemplate query = new SQLTemplate(VersionedObjectImpl.class, s

Re: Object Caching

2009-11-12 Thread Hans Pikkemaat
that one. On Nov 12, 2009, at 10:43 AM, Hans Pikkemaat wrote: Hi, Yes, the paginated query would indeed be the only way for me to go forward. The problem however is that I get the exception I posted earlier. tx Hans Andrus Adamchik wrote: For paginated qu

Re: Object Caching

2009-11-12 Thread Hans Pikkemaat
at you can use your extension directly without any need to modify the rest of Cayenne. Andrus [1] http://cayenne.apache.org/doc/api/org/apache/cayenne/access/IncrementalFaultList.html On Nov 12, 2009, at 10:07 AM, Hans Pikkemaat wrote: Hi, So this means that if I use a generic query that

Re: Object Caching

2009-11-12 Thread Hans Pikkemaat
bjects), the objects won't get gc'd. You can explicitly remove entries from the cache via QueryCache remove and removeGroup methods. Or you can use a different QueryCacheFactory that implements some custom expiration/cleanup mechanism. Andrus On Nov 11, 2009, at 3:43 PM, Hans Pikkemaa

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-11 Thread Hans Pikkemaat
o make sure I understand all the settings used in this specific case). And also if possible, SQL generated in the console for the initial query, and then for the failing page query? Thanks, Andrus On Nov 11, 2009, at 2:51 PM, Hans Pikkemaat wrote: Hi,

Object Caching

2009-11-11 Thread Hans Pikkemaat
Hi, I use the latest version of cayenne, 3.0b and am experimenting with the object caching features. The documentation states that committed objects are purged from the cache because it uses weak references. (http://cayenne.apache.org/doc/individual-object-caching.html) If I however run a q

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-11 Thread Hans Pikkemaat
ade to 3.0B1 is worse trying. It fixes lots of rough edges around joint prefetching, paginated queries, etc. Andrus On Nov 10, 2009, at 5:38 PM, Hans Pikkemaat wrote: Hi, It seems that when I set a page size on a regular query with join prefetching, cayenne checks if the nu

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-10 Thread Hans Pikkemaat
. Any idea how to overcome this? tx HPI Hans Pikkemaat wrote: Hi, Thanks for your quick response! I kind of expected that prefetches and iterated queries would not work, thats the reason for this post :) I tried the page size on a non iterated query but then I get a weird exception that I

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-10 Thread Hans Pikkemaat
me time. I also highly encourage you to try today-released Cayenne3.0 beta. It proved to be stable and many prefetching (ant other!) improvements were made. Check the main site! 2009/11/10 Hans Pikkemaat <mailto:h.pikkem...@tsi-solutions.nl> Hi, My case:

Re: complex query vs performIteratedQuery vs Prefetching

2009-11-10 Thread Hans Pikkemaat
h table data will be returned altogether (in same db row), so you will be able to iterate though them at the same time. I also highly encourage you to try today-released Cayenne3.0 beta. It proved to be stable and many prefetching (ant other!) improvements were made. Check the main site! 2009/

complex query vs performIteratedQuery vs Prefetching

2009-11-10 Thread Hans Pikkemaat
Hi, My case: I have a complex query which returns a huge amount of data. It returns data from two tables which are joined. Because the amount of data is huge I cannot load all of it into memory. For this reason I want to use an iterated query. I also want to prevent cayenne from executing a

complex query vs performIteratedQuery vs Prefetching

2009-11-10 Thread Hans Pikkemaat
Hi, My case: I have a complex query which returns a huge amount of data. It returns data from two tables which are joined. Because the amount of data is huge I cannot load all of it into memory. For this reason I want to use an iterated query. I also want to prevent cayenne from executing a