Re: How to stop a long running query?

2010-08-20 Thread Andrus Adamchik
On Aug 19, 2010, at 6:43 PM, Chris Poulsen wrote: the strategy I found to be least intrusive was to wrap the JDBC connection/statements in my own Connection/*Statement classes and let statements register themselves somewhere accessible from other threads on creation and unregister on

Re: Cayenne 3.0 and DataViews/DVModeler

2010-08-21 Thread Andrus Adamchik
Hi Tomas, yeah, that's the case. I should also note that we'll be happy to revive the DV project if we find a dedicated volunteer to support it. I guess if that happens, my main request would be to keep the DV stuff decoupled from Cayenne runtime and cayenne.xml file. Cheers, Andrus On Aug

Re: Antwort: INSERT with raw_sql_query returns error

2010-08-25 Thread Andrus Adamchik
Exactly. However something like that may work (columns will have to be a comma-separated String) : insert into $schema.$table ($columns) values(#bind($values)) Andrus On Aug 25, 2010, at 7:46 AM, patrick.may...@gi-de.com wrote: Hi Nikos, the #bind variables are replaced by

Re: Escaping of characters in like/likeIgnoreCase expressions

2010-08-25 Thread Andrus Adamchik
Actually support for escape char was added per CAY-1380 to ExpressionFactory in Cayenne 3.0.1 (which will hopefully be released in a week or two. To get this feature you can either do a build from 3.0-STABLE branch [1] or wait, or use EJBQLQuery that already supports it in 3.0. Cheers, Andrus

Re: Cayenne vs Hibernate Comparison

2010-09-06 Thread Andrus Adamchik
There's been discussions on this list, but I haven't seen a full systematic comparison. When people ask me about this I usually frame this discussion as what's unique about Cayenne, as I am not a Hibernate user and don't know it fine details. As I mentioned in the 3.0 announcement blog:

Re: refreshing prefetched objects.

2010-09-07 Thread Andrus Adamchik
Very strange. Prefetching always refreshes related objects. Andrus On Sep 7, 2010, at 7:52 AM, Hans Pikkemaat wrote: Hi, I'm running a SelectQuery where I'm using a joint prefetch. query.addPrefetch(...).setSemantics(PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS); I turned caching

Re: Cayenne 3.0.1 released

2010-09-07 Thread Andrus Adamchik
On Sep 7, 2010, at 12:50 PM, Aristedes Maniatis wrote: * Create a source cayenne assembly I should explain a bit about this one. There is a new distribution file - cayenne-3.0.1-src.tar.gz that contains all Cayenne sources (not just a subset as it used to). The source distro is buildable

Re: refreshing prefetched objects.

2010-09-08 Thread Andrus Adamchik
Yeah, I would definitely suggest to upgrade. Upgrade should be rather straightforward. Follow the UPGRADE-NOTES.txt. Andrus On Sep 8, 2010, at 5:58 AM, Hans Pikkemaat wrote: 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

Re: NPE in BaseClassDescriptor

2010-09-08 Thread Andrus Adamchik
Looks like the descriptor is not initialized for some reason. By now I don't remember all the internal details of the initialization cycle specific to v. 1.2, but my random guess is that (de)serialization is involved here? Other than that, figuring it out may require running the app in

Re: cayenne-ANT : package org.apache.cayenne does not exist

2010-09-13 Thread Andrus Adamchik
Hi, Your Ant file probably doesn't have the right classpath, specifically the Cayenne jars. I am curios though why are you not using Maven as tutorial is Maven based and provides all the setup steps to get you going? Andrus On Sep 9, 2010, at 12:43 PM, bogdan_voloshincu wrote: hello! i

Re: Keeping hessian servlet session active with a rop client

2010-09-14 Thread Andrus Adamchik
Nothing that is built in for this purpose, and IIRC that 'getEntityResolver' approach may no longer work, as we are caching it now on the client. You can issue a simple query instead I guess. Something that executes quickly and doesn't bring back any data. It may even end up having better

Re: Bug with EJBQL query referencing two subclasses?

2010-09-14 Thread Andrus Adamchik
Hi Dave, Will be very happy if you can dig to the cause of this issue. EJBQLQuery parsing into SQL starts at org.apache.cayenne.access.jdbc.EJBQLAction. Cayenne walks EJBQL syntax tree, calling visitor callback methods and occasionally switching the visitor object. You may start debugging

Re: Cayenne error while committing CLOB on Oracle

2010-09-14 Thread Andrus Adamchik
Hi there, My memory of this code is a bit rusty now. Could you provide a bigger chunk of the stack please - up to the DataContext commit call? And also maybe an output of DESC CSPROPERTY to see the types of PROPERTYVALUE and CSPROPERTYGUID columns. Andrus On Sep 14, 2010, at 5:23 PM,

Re: Deploying multiple instances from a single war

2010-09-15 Thread Andrus Adamchik
Hi Emanuele, The trick would be to create a custom subclass of Cayenne HessianService, overriding 'initCayenneStack(Map properties)'. Based on some property value in a properties map, you can load Cayenne stack from an alternative location (e.g. by renaming one of the cayenne.xml files, and

Re: cayenne-ANT : package org.apache.cayenne does not exist

2010-09-15 Thread Andrus Adamchik
On Sep 15, 2010, at 11:27 AM, bogdan_voloshincu wrote: Maven offer a more important advantage than ant ?? Different paradigm, more scaleable in terms of the project complexity. Ultimately it is up to you of course - use what you feel comfortable with. Andrus

Re: Child Contexts

2010-09-23 Thread Andrus Adamchik
On Sep 22, 2010, at 2:17 AM, b...@holos.pt wrote: Can I use a Cayenne client on each portlet and create a cayenne server on a servlet to receive their requests? this way all database communication is done by the servlet and not by all portlets. This is possible, but it will add not

Re: Child Contexts

2010-09-23 Thread Andrus Adamchik
figuring out the DataSource mapping is a better idea. Andrus On Sep 23, 2010, at 10:37 AM, Andrus Adamchik wrote: On Sep 22, 2010, at 2:17 AM, b...@holos.pt wrote: Can I use a Cayenne client on each portlet and create a cayenne server on a servlet to receive their requests? this way all

Re: Child Contexts

2010-09-23 Thread Andrus Adamchik
portlets so that all of them share a connection pool? Bruno -Mensagem original- De: Andrus Adamchik [mailto:and...@objectstyle.org] Enviada: quinta-feira, 23 de Setembro de 2010 08:45 Para: user@cayenne.apache.org Assunto: Re: Child Contexts Haven't read the earlier messages

Re: Exception in Cayenne Modeler, heap blows up

2010-09-24 Thread Andrus Adamchik
Hi Tomas, Yeah, I think attachments are stripped from the list messages automatically on the server. Are you using the Windows or Mac Modeler? Both are pre configured to run with 0.5 GB of heap space, but maybe -Xmx is getting lost along the way. Andrus On Sep 24, 2010, at 8:07 AM, Tomas

Re: Exception in Cayenne Modeler, heap blows up

2010-09-24 Thread Andrus Adamchik
On Linux, you should probably run it as java -Xmx512m CayenneModeler.jar or something like that, so specifying how much heap the JVM should use is up to you. In a Windows assembly run from .exe, -Xmx is passed by the executable launcher, and the user doesn't have much control (except that he

Re: Expression.filter and UUIDs

2010-09-27 Thread Andrus Adamchik
There's no parsable notation for UUID. So you can either use API to assemble expressions, or use a parameter bound via API at a later time: propertyXY = $x Or we can work together on supporting constructors in Expressions, similar to how JPQL does: propertyXY = new java.util.UUID(1, 2)

Re: Expression.filter and UUIDs

2010-09-27 Thread Andrus Adamchik
On Sep 27, 2010, at 3:06 PM, Adrian Wiesmann wrote: Or we can work together on supporting constructors in Expressions, similar to how JPQL does: propertyXY = new java.util.UUID(1, 2) I'd be willing to work on this. How can we proceed with that? Cool. We may continue this discussion

Re: A SDO Query with cayenne

2010-09-28 Thread Andrus Adamchik
Not an expert on Oracle Spatial, but I think you should be able to run this via SQLTemplate query: http://cayenne.apache.org/doc30/sqltemplate-query.html Andrus On Sep 28, 2010, at 2:11 PM, ЄЖЄRSoN CმStმNЄDმ S wrote: Hello everyone, I am newby in Cayenne 3.0, I would like to know if it is

Re: sorted to many relations

2010-09-30 Thread Andrus Adamchik
PM, Juergen Saar wrote: Fine .. Is there already a time frame for Version 3.1? 2010/9/30 Andrus Adamchik and...@objectstyle.org All discussions of this feature have usually caused a certain amount of disagreement on how this should behave, so I guess this is why nobody committed

Re: Exception in Cayenne Modeler, heap blows up

2010-10-02 Thread Andrus Adamchik
Hi Gilberto, Yeah, there was a recent confirmation of your problem from another user: https://issues.apache.org/jira/browse/CAY-1488 Looks like it happens on certain schemas. We are investigating... Andrus On Oct 1, 2010, at 11:40 PM, gilbertoca wrote: When I try:

Re: A SDO Query with cayenne

2010-10-02 Thread Andrus Adamchik
Hi EmeCas, I think that one more alternative to avoid including SDO functions in my query... Sounds like a good idea. how can i call MyProcedure and get the results from a Java Class using Cayenne? A stored procedure can be mapped in CayenneModeler and later invoked via a

Re: objectFromDataRow NPE

2010-10-07 Thread Andrus Adamchik
Hi Jeff, From the lines in the stack trace, looks like context.getObjectStore().getDataRowCache() returns null, causing an NPE downstream. Now wondering why that can happen... Are you serializaing/deserializaing your DataContext? Andrus On Oct 6, 2010, at 9:04 PM, Rorison, Jeff wrote: I

Re: Exception in Cayenne Modeler, heap blows up

2010-10-07 Thread Andrus Adamchik
You are running the wrong modeler I think. Try this: mvn clean install -Passembly,generic and then unpack the distro under cayenne/assembly/target/*.gz and run CayenneModeler.jar from there. Andrus On Oct 7, 2010, at 8:00 PM, gilbertoca wrote: I've tried ... but:

Re: objectFromDataRow NPE

2010-10-08 Thread Andrus Adamchik
I confirmed - this is a bug with a nested context. Just opened a Jira: https://issues.apache.org/jira/browse/CAY-1489 We'll work on fixing it. Andrus On Oct 7, 2010, at 7:01 PM, Jeff Rorison wrote: Andrus Adamchik andrus at objectstyle.org writes: Hi Jeff, From the lines in the stack

Re: maven-cayenne-plugin cgen issue

2010-10-11 Thread Andrus Adamchik
Seems like a bug. I opened a Jira: https://issues.apache.org/jira/browse/CAY-1490 Andrus On Oct 9, 2010, at 12:15 AM, Alexander Yaremenko wrote: Andrus, that did not help either. Here is extract from my pom: plugins plugin

Re: Required cayenne dependencies not available in maven central

2010-10-12 Thread Andrus Adamchik
Hi Marc, Good catch. We do ship those jars with Cayenne release (so you have an option of doing mvn install:file), but the Central repo is indeed missing those. I guess we (the Cayenne developers) or somebody else (e.g. our user) should get those Jars in the Maven central. Anybody in the world

Re: Some questions

2010-10-12 Thread Andrus Adamchik
Hi Andre, On Oct 12, 2010, at 3:49 PM, André Rothe wrote: Hello, I'm not familiar with Cayenne, so I have some question to come to a decision about the usage of Cayenne in the current project. Is it possible to use multiple databases with Cayenne? We have written some code to load

Re: cayenne-plugin and superpkg

2010-10-13 Thread Andrus Adamchik
Yeah, I think providing better superPkg defaults (such as relative auto) and support for relative superPkg will be a nice enhancement. Fill free to open an improvement request in Jira :-) Andrus On Oct 13, 2010, at 10:12 AM, André Rothe wrote: Ooops, I have read the ant-task documentation

Re: Relationship not set (NULL)

2010-10-14 Thread Andrus Adamchik
? Thanks, Borut 2010/10/13 Andrus Adamchik and...@objectstyle.org Hi Borut, On Oct 13, 2010, at 12:02 PM, Borut Bolčina wrote: MapObjectType localMot = (MapObjectType) dataContext.localObject(mot.getObjectId(), mot); Not sure if there's anything else involved, but the use

Re: Context question

2010-10-15 Thread Andrus Adamchik
Getting used to ObjectContext may take some time when coming from other ORM backgrounds, but in general most people have a rather smooth ride with it. While I can theoretically see a value of (optionally?) selecting against uncommitted objects, I've never had a practical case for it in my apps.

Re: Context question

2010-10-15 Thread Andrus Adamchik
On Oct 15, 2010, at 11:24 AM, Andrey Razumovsky wrote: The reason of 2) is that Cayenne uses caching of data objects, which greatly increases performance. So object is basically the same. You can refresh the cache using RefreshQuery. No actually the reason for this is not caching, but the

Re: Writable FKs

2010-10-20 Thread Andrus Adamchik
On Oct 19, 2010, at 10:36 AM, Borut Bolčina wrote: This way using street.setTown(localTown); does not set the relationship, it inserts NULL for town_id FK in the streets table. Or did you mean something else? Probably (?) didn't quite get the explanation of your mapping. Anyways, have

Re: OnPrePersist not working

2010-10-20 Thread Andrus Adamchik
Odd. Should be working. Do you actually see INSERT statement in the logs, but no callback before that? Andrus On Oct 20, 2010, at 4:05 AM, Bruno René Santos wrote: Hello All, I have created a pre-persist callback to set a property from my pojo. But when I commit changes the callback is

Re: OnPrePersist not working

2010-10-20 Thread Andrus Adamchik
On Oct 20, 2010, at 1:14 PM, Bruno René Santos wrote: Do you think validating after pre-persist could lead to problems? I think it would help pre-persist to be more useful, allowing us to calculate mandatory fields. Maybe a good idea actually. Care to open a Jira? We'll think about it.

Re: Groovy + Cayenne (Dynamic Loading of Mapping Files)

2010-10-20 Thread Andrus Adamchik
Cayenne stack is completely dynamic. Nothing is precompiled, enhanced or proxied, unlike Hibernate. There is a metadata cache that will need to get updated, but that can be done without a restart. So you can create mapping dynamically even in Java:

Re: objectFromDataRow NPE

2010-10-21 Thread Andrus Adamchik
Just committed the patch submitted by Andrei Veprev to 3.0.x branch and 3.1 (trunk). So this is fixed and will be available in the next release. Andrus On Oct 8, 2010, at 8:07 PM, Jeff Rorison wrote: Andrus Adamchik andrus at objectstyle.org writes: I confirmed - this is a bug

Re: Cayenne Source

2010-10-26 Thread Andrus Adamchik
You can download the official 3.0.1 source from here: http://www.apache.org/dyn/closer.cgi/cayenne/cayenne-3.0.1-src.tar.gz Andrus On Oct 26, 2010, at 1:17 PM, Bruno René Santos wrote: Hello all, I have downloaded the cayenne 3.0.1 source from the SVN to use as autocomplete source on

Re: JDBC batching MySQL

2010-10-27 Thread Andrus Adamchik
Hi Borut, I may try running it in debugger this week or early next week (during ApacheCon, when I have a bit of spare time). For now can you explain how do you know that batching didn't work? Was there an exception? Was a a difference in performance, etc? IIRC the only difference in Cayenne

Re: JDBC batching MySQL

2010-10-27 Thread Andrus Adamchik
On Oct 27, 2010, at 3:18 PM, Borut Bolčina wrote: That is bind, and not batch bind as you just explained. Ok, so somehow Cayenne didn't switch to batch-bind mode. Looking at the code in BatchAction.java, batch mode can also be suppressed for AUTO INCREMENT PK, as other drivers (I don't

Re: MySQL error - connection reset

2010-10-28 Thread Andrus Adamchik
It was for the users of org.apache.cayenne.conf.WebApplicationContextFilter. If an app bootstraps Cayenne on its own, I would suggest emulating this filter's destroy method in an appropriate servlet or filter: public void destroy() { Configuration config =

Re: Writable FKs

2010-11-04 Thread Andrus Adamchik
On Nov 4, 2010, at 9:48 AM, Borut Bolčina wrote: At the database level, the FK attribute is set to NOT NULL, but this is not related with the Cayenne. Yeah, this is what triggers the validation message. I'd say it is a bug - Cayenne should be smarter about meaningful FK + relationship

Re: pre-remove, post-remove

2010-11-06 Thread Andrus Adamchik
Hi, Just found a bit unrelated issue with POST_LOAD callback: https://issues.apache.org/jira/browse/CAY-1503 For your case, it should help if you could post a code example with comments on where you are seeing and not seeing the callbacks. Andrus On Nov 1, 2010, at 8:10 PM, Bruno René

Re: Reengineer Database Schema not generating anything

2010-11-07 Thread Andrus Adamchik
***Here I get a list of all the catalogs and then I get a list of all of the tables in all of the catalogs*** Is this what you were asking me to test? What do I try next?? On Wed, Nov 3, 2010 at 5:36 PM, Andrus Adamchik and...@objectstyle.orgwrote: At the end reverse engineering

Re: pre-remove, post-remove

2010-11-07 Thread Andrus Adamchik
++) apl.removeFromHoMovimentosAplicacoesArray(movs.get(i)); manager.getContext().deleteObjects(movs); Do I need to remove the objects from the relationships before deleting them or just delete them? Thanx Bruno -Mensagem original- De: Andrus Adamchik [mailto:and...@objectstyle.org] Enviada: sábado, 6

Re: To Dep PK bug?

2010-11-07 Thread Andrus Adamchik
Very odd. Please file a Jira. Maybe we can reproduce it with our unit tests? So what is optimistically locked in this case? Andrus On Nov 5, 2010, at 9:30 AM, Michael Gentry wrote: It even fails if I include the dependent: DataContext dataContext = DataContext.createDataContext();

Re: Composite entity model

2010-11-09 Thread Andrus Adamchik
I wish somebody just wrote a marshaller for CDO. One day I may do it if nobody beats me on it. Andrus On Nov 7, 2010, at 7:37 PM, Marek Šabo wrote: Hi all, Would it be possible to generate entities not as children of CayenneDataobject but as self composite objects with a CDO field? I'm

Re: Composite entity model

2010-11-09 Thread Andrus Adamchik
: Hi Guys, Please take a look at the attached code which marshalls between ValueObject (POJO) and CDO. regards Malcolm Edgar On Wed, Nov 10, 2010 at 7:26 AM, Andrus Adamchik and...@objectstyle.org wrote: I wish somebody just wrote a marshaller for CDO. One day I may do it if nobody

Re: Composite entity model

2010-11-09 Thread Andrus Adamchik
On Nov 9, 2010, at 8:15 PM, Marek Šabo wrote: @Andrus: what you have in mind is new implementation of JAXB or just some sort of marshalling support for CDOs? JAXB, although I don't see myself doing it in the nearest future. Andrus

Re: pre-remove, post-remove

2010-11-10 Thread Andrus Adamchik
Ok, I think this is closer: https://issues.apache.org/jira/browse/CAY-1505 I found this in my own application and am working on a fix now. Andrus On Nov 6, 2010, at 12:57 PM, Andrus Adamchik wrote: Hi, Just found a bit unrelated issue with POST_LOAD callback: https

Re: pre-remove, post-remove

2010-11-10 Thread Andrus Adamchik
Fixed in Subversion. On Nov 10, 2010, at 2:23 PM, Andrus Adamchik wrote: Ok, I think this is closer: https://issues.apache.org/jira/browse/CAY-1505 I found this in my own application and am working on a fix now. Andrus On Nov 6, 2010, at 12:57 PM, Andrus Adamchik wrote: Hi

Re: Reserverd words mapping question

2010-11-11 Thread Andrus Adamchik
Looks like a bug to me. Appreciate if you could open a bug report, we'll take a look: https://issues.apache.org/jira/browse/CAY Thanks, Andrus On Nov 11, 2010, at 7:38 AM, Lautaro Brasseur wrote: Hi. I need to map a database schema which has reserverd words in column names (with Cayenne

Re: Dynamic SQL object query

2010-11-14 Thread Andrus Adamchik
On Nov 13, 2010, at 12:40 AM, Marek Šabo wrote: SELECT #result('COUNT(id)' 'Long' 'count') from User #chain('AND' 'WHERE') #chunk($userId) id = #bind($userId) #end #chunk($userName) userInfo.name LIKE $userName #end #end becuase of userInfo.name which is object-style. So my first

Re: pls helppppp !!! cayenne.xml

2010-11-21 Thread Andrus Adamchik
Hmm, your question was about refreshing Configuration loaded from cayenne.xml. Looking at your second message, I am no longer sure that I understood your setup and what you are trying to do. But in any event... 'DataContext.createDataContext' uses shared static Configuration (You may take a

Re: cdataport Access denied for user .......

2010-11-22 Thread Andrus Adamchik
Login is null, is this correct? Andrus On Nov 22, 2010, at 8:35 PM, bogdan_voloshincu wrote: [cdataport] INFO: Opening connection: jdbc:mysql://localhost:3306/date [cdataport] Login: null [cdataport] Password: *** [cdataport] Nov 22, 2010 8:26:18 PM

Re: Dynamic SQL object query

2010-11-23 Thread Andrus Adamchik
On Nov 21, 2010, at 6:18 PM, Marek Šabo wrote: 1) When 'id' is not object-mapped ejbql complains about invalid path, I found only this http://www.mail-archive.com/user@cayenne.apache.org/msg02992.html and it seems to be a dead end. Foolish attempt prefixing with 'db:' didn't work.

Re: problems after upgrading jetty and hessian to the latest version

2010-11-23 Thread Andrus Adamchik
On Nov 23, 2010, at 10:57 AM, Aristedes Maniatis wrote: Also, the version of Hessian we are using (3.1.6) looks to be missing from Maven Central. I would have sworn it was there before, but it can be found only at the caucho repository as far as I can tell. Should we push it to maven

Re: cdataport Access denied for user .......

2010-11-23 Thread Andrus Adamchik
On Nov 23, 2010, at 11:33 AM, bogdan_voloshincu wrote: Yes and before cdataport i use cdbimport and cgen and those two work without any problems. Both against MySQL, not Oracle? And from the same client computer? Andrus

Re: Deadlock in PoolManager

2010-11-23 Thread Andrus Adamchik
Interesting. I guess we haven't seen it before cause people don't call dispose that often. Please open a Jira. Thanks, Andrus On Nov 23, 2010, at 5:54 PM, Laurent Marchal wrote: Hi all, I'm using cayenne 3.0 ans I'm experiencing a deadlock when I exit my application. I call

Re: Cayenne wicket application

2010-12-02 Thread Andrus Adamchik
On Dec 1, 2010, at 10:22 PM, Mark Fischer wrote: I have the microsoft jdbc driver in my classpath so I do not understand why it is not being found? Were exactly is the driver? In the .war? An easy way to doublecheck that it is available is to print the actual classpath from the application

[ann] Cayenne 3.1M1

2010-12-02 Thread Andrus Adamchik
http://cayenne.apache.org/2010/12/02/cayenne-31-its-alive.html We are pleased to announce the first milestone of Cayenne 3.1. A number of new and exciting features and fully redesigned DI-based configuration mechanism. Follow the link above for more details. Enjoy! Andrus

Fwd: deprecate XML package in 3.1

2010-12-02 Thread Andrus Adamchik
Hi Cayenne users, the issue in the subject is being currently discussed by Cayenne developers (see the message from dev below). Anybody's using XML serialization now? If so I'd like to hear how you deal with all the deficiencies of this package? Thanks, Andrus Begin forwarded message: To:

Re: Wicket and Cayenne

2010-12-02 Thread Andrus Adamchik
Just a guess. Know nothing about Wicket... Looks like CayenneFilter wraps something called ClickServlet (which is not shown elsewhere in web.xml), and Wicket call is made from the wicket.lockbox filter, which is out of scope of CayenneFilter. Andrus On Dec 2, 2010, at 9:39 PM, Mark Fischer

Re: [ann] Cayenne 3.1M1

2010-12-03 Thread Andrus Adamchik
compatible if you want to go back to 3.0. Thanks and please give feedback! :-) mrg On Thu, Dec 2, 2010 at 6:04 AM, Andrus Adamchik and...@objectstyle.org wrote: http://cayenne.apache.org/2010/12/02/cayenne-31-its-alive.html We are pleased to announce the first milestone of Cayenne

Re: Running the modeler from Maven

2010-12-15 Thread Andrus Adamchik
We really need to push those deps to Maven central :-/ In the meantime you can map this repo that should have them: http://objectstyle.org/maven2/ Andrus On Dec 15, 2010, at 4:35 PM, Dirk Olmes wrote: Hi, I'm preparing a project that will take off in the new year and chose Cayenne as the

Re: problem with DefaultConfiguration in ROP

2010-12-16 Thread Andrus Adamchik
Hi Marcin, Yes, you will need to add this classpath to the server-side ROP stack. To do this, subclass org.apache.cayenne.remote.hessian.service.HessianService, overriding 'initCayenneStack' method (inherited from superclass). Finally configure your subclass in web.xml as 'service-class' init

Re: Which database am I connected to?

2010-12-17 Thread Andrus Adamchik
I guess if we do something like that, we won't go below DataSource... I am still thinking how to expose DataSource via DI. Andrus On Dec 17, 2010, at 4:02 PM, Borut Bolčina wrote: Hi, sometimes when creating administrative web applications you want to show to which database the

Re: non meaningful pk philosophy, and composite pk question

2010-12-17 Thread Andrus Adamchik
Hi Joey, On Dec 17, 2010, at 9:57 PM, Joseph P. Berglund wrote: I am new to cayenne, and am enjoying it immensely! A few questions- A1) I understand that the use of automatically generated, non-meaningful primary keys is one of the philosophies supported by cayenne. Yes. In this

Re: Cayenne 3.0.1 - Error resolving fault for Objectid

2010-12-22 Thread Andrus Adamchik
Can you confirm that there is a record for MpMiniPublication with id of 9279? Andrus On Dec 22, 2010, at 1:51 AM, Carmen Grantham wrote: Why is the following error still occuring? Caused by: org.apache.cayenne.FaultFailureException: [v.3.0.1 Aug 25 2010 19:58:47] Error resolving fault for

Re: CreateIfNoSchemaStrategy not as I expected

2010-12-27 Thread Andrus Adamchik
So far CreateIfNoSchemaStrategy worked pretty reliably for me. So very odd.. Could you please open a bug report in Jira. We may take a look. (Please also specify version of Derby). Andrus On Dec 26, 2010, at 10:43 PM, Tomas Stenlund wrote: Hi, I'm using Cayenne 3.0 with Derby as an

Re: transactions vs iterated query

2011-01-06 Thread Andrus Adamchik
On Jan 6, 2011, at 10:48 AM, Hans Pikkemaat wrote: One library calls the other one. The first one is using the iterated query to get some data. It will call the second library to process the data. IMO this first library (iterator control code) should be the place that does transaction

Re: Left Outer Joins without expressions

2011-01-06 Thread Andrus Adamchik
needed a ... from table1 left join table2 Regards Bruno Em 05-01-2011 18:20, Andrus Adamchik escreveu: IIRC in 3.0 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS generates an outer join by default (???) Andrus On Jan 5, 2011, at 2:14 AM, Bruno René Santos wrote: Hello all

Re: Operating only with stored procedures?

2011-01-11 Thread Andrus Adamchik
You can sure call stored procedures from Cayenne and map simple objects, etc., but I don't think there's a practical way to use relationships, or to implement full object lifecycle. In other words if your DB interaction is limited to stored procedures, Cayenne may work as a persistence utility

Re: rowSets not defined in example

2011-01-14 Thread Andrus Adamchik
Good catch, thanks! It should be something like this: QueryResponse response = context.performGenericQuery(query); for (response.reset(); response.next();) { if (response.isList()) { List list = response.currentList(); // ... } else { int[] updateCounts =

Re: Stored procedures - more examples?

2011-01-18 Thread Andrus Adamchik
On Jan 17, 2011, at 7:27 PM, David Balažic wrote: Hi! Are there any more examples of using stored procedures besides the ones in the guide*? I can't think of any except for unit tests in Cayenne under DataContextProcedureQueryTest.java. Others may have better examples. What exactly is

Re: custom data type mapping for java.util.Date to java

2011-01-18 Thread Andrus Adamchik
Yes, beyond the standard type mapping, you can map any data type to a DB column in Cayenne by implementing and registering an ExtendedType: http://cayenne.apache.org/doc30/extended-types.html Andrus On Jan 18, 2011, at 8:40 PM, Joseph P. Berglund wrote: Date/DateTime db fields currently map

Re: Stored procedures - more examples?

2011-01-18 Thread Andrus Adamchik
On Jan 18, 2011, at 8:28 PM, David Balažic wrote: So, does that testcase really work on Oracle? Yes. Now revisiting the tests, we are cheating to make the generic mapping work with Oracle. The reason for this is Oracle driver's insistence on circumventing basic JDBC abstractions. We take a

Re: likeIgnoreCaseDbExp syntax error in 3.0.1

2011-01-18 Thread Andrus Adamchik
Hi Li, Looks like a bug to me. Could you please open a bug report in Jira ( https://issues.apache.org/jira/browse/CAY ), providing the information below, and maybe also a specific piece of Java code that causes this error. Thanks, Andrus On Jan 19, 2011, at 1:03 AM, Li Zhou wrote: Hi, All

Re: Stored procedures - more examples?

2011-01-19 Thread Andrus Adamchik
just copied over the content of OracleStackAdapter.tweakProcedure(). Is there anything special I should look out for? Regards, David -Original Message- From: Andrus Adamchik [mailto:and...@objectstyle.org] Sent: Tuesday, January 18, 2011 9:33 PM To: user@cayenne.apache.org

Re: Modeller - reenginered functions parameters

2011-01-19 Thread Andrus Adamchik
Unfortunately reverse engineering completely depends on the metadata provided by the driver, which means Cayenne often gets incomplete information, that has to be filled by the user manually. I suspect this is what happened here as well. Andrus On Jan 19, 2011, at 6:43 PM, David Balažic wrote:

Re: Modeller - reenginered functions parameters

2011-01-19 Thread Andrus Adamchik
Yeah, I guess we can make an assumption here... Feel free to open a Jira. Andrus On Jan 19, 2011, at 8:16 PM, David Balažic wrote: Yes, but a function return is always direction OUT, isn't it? David -Original Message- From: Andrus Adamchik [mailto:and...@objectstyle.org

Re: Creating or loading Datamap

2011-01-21 Thread Andrus Adamchik
Hi André, Yes, if you wish you can create the entire Cayenne stack via API, loading parts of it from XML files, etc. * To load DataMap from XML, use MapLoader: http://cayenne.apache.org/doc30/api/org/apache/cayenne/map/MapLoader.html * To create a DataContext, use

Re: Modeller - how does it find pocedures?

2011-01-21 Thread Andrus Adamchik
Cayenne uses JDBC API, so it uses whatever the driver gives it. java.sql.DatabaseMetaData.getProcedures(String catalog, String schemaPattern, String procedureNamePattern) (IIRC 'catalog' parameter is ignored by the Modeler, schema and procedure name are user choices). Andrus On Jan 21,

Re: Creating or loading Datamap

2011-01-21 Thread Andrus Adamchik
On Jan 21, 2011, at 2:53 PM, André Rothe wrote: Should I set the name explicitly to org.apache.cayenne.CayenneDataObject (or subclasses)? Setting org.apache.cayenne.CayenneDataObject is optional (this is the default). If you want to use your own subclass, definitely call

Re: Creating or loading Datamap

2011-01-21 Thread Andrus Adamchik
the data sources (instances of PoolManager). mapName = test. I think, I don't need a full-defined ObjectEntity, because it is dynamic. I set only the class name (default) and the DbEntity instance. So where I have forgotten a call? Thanks a lot André Andrus Adamchik

Re: Cayenne 3.1 and injection

2011-01-23 Thread Andrus Adamchik
Correct. Injection is an internal thing. You will only care about it if you decide to override some Cayenne internals. Andrus On Jan 21, 2011, at 11:26 PM, Øyvind Harboe wrote: After having correctly converted cayenne.xml = Cayenne 3.1 it seems like I can stay blissfully ignorant of inject

Re: Error on BaseContext - object is modified when committed is expected

2011-01-24 Thread Andrus Adamchik
Can you confirm that there is a record for HoVPlanoContas in the database with id of 129? Is it reproducible? Andrus On Jan 24, 2011, at 3:03 AM, Bruno René Santos wrote: Hello all, Im having an error when I access an object: Caused by: org.apache.cayenne.FaultFailureException: [v.3.0.1

Re: Error on BaseContext - object is modified when committed is expected

2011-01-24 Thread Andrus Adamchik
? Any other ideas? Thanx Bruno Em 24-01-2011 09:43, Andrus Adamchik escreveu: Can you confirm that there is a record for HoVPlanoContas in the database with id of 129? Is it reproducible? Andrus On Jan 24, 2011, at 3:03 AM, Bruno René Santos wrote: Hello all, Im having an error

Re: Error on BaseContext - object is modified when committed is expected

2011-01-24 Thread Andrus Adamchik
you left on the code? Could I try like a commitChanges there? Any ideas are welcome :) Thanx Bruno Em 24-01-2011 10:18, Andrus Adamchik escreveu: I am developing a web application so it is possible that some thread is interfering on the refreshing of the Object Cache? This depends

Re: Error on BaseContext - object is modified when committed is expected

2011-01-24 Thread Andrus Adamchik
On Jan 24, 2011, at 1:04 PM, Bruno René Santos wrote: So the best way to do this is to keep my shared DataContext for reading and when I need to change something I create a new DataContext, pass the object read to this new context (using for instants an ObjectIdQuery) and commit on this

Re: Error on BaseContext - object is modified when committed is expected

2011-01-24 Thread Andrus Adamchik
On Jan 24, 2011, at 1:26 PM, Bruno René Santos wrote: I'll try to modify the CommitChanges and CommitChangesToParent in order to create a very short lived context to where I copy all modifiedObjects and deletedObjects in order to commit them. There should be no modified or deleted objects

Re: procedures in package not correctly called

2011-01-24 Thread Andrus Adamchik
Yeah, there's no proper catalog support when Cayenne builds fully qualified names. You may enter PKG1.SCH as your schema name. Separately we may discuss the need for supporting JDBC catalogs in Cayenne separately from schemas. Andrus On Jan 24, 2011, at 2:24 PM, David Balažic wrote: Hi!

Re: [ann] Cayenne 3.1M1

2011-01-24 Thread Andrus Adamchik
Thanks for sharing this info. Would you mind creating a bug report in Jira? Andrus On Jan 24, 2011, at 3:52 PM, gilbertoca wrote: Hi, happy new hear for all! Hope everyone is ok as well! Just a little problem, I can't run the Cayenne Modeler from maven anymore:

Re: Multiple connections per transaction

2011-01-25 Thread Andrus Adamchik
Actually recent versions of Cayenne (3.0, maybe earlier) are ensuring a use of a single connection per transaction. Andrus On Jan 25, 2011, at 3:31 PM, André Rothe wrote: Hi, I have seen, that Cayenne uses multiple connections per transaction (a DataNode can have multiple connections and

Re: SET Datatype

2011-02-02 Thread Andrus Adamchik
Haven't tried it, but I think SQLTemplate should handle it. Andrus On Feb 2, 2011, at 5:21 AM, Jepse wrote: Hi, is anybody familiar with the Mysql Datatype Set? http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html For some reason we stores Boolean values fields for

Re: Mapping (My)SQL function

2011-02-08 Thread Andrus Adamchik
I can't predict the outcome, but certainly worth trying and reporting back the result. Andrus On Feb 7, 2011, at 2:41 PM, Marek Šabo wrote: Hi, I would like to ask for advice, what would be a good way to get outcome of (my)sql functions in cayenne. Is there any other way than calling it

<    4   5   6   7   8   9   10   11   12   13   >