Re: Cayenne 3.0M4 ignoring extended data types

2008-08-04 Thread Andrus Adamchik
On Aug 4, 2008, at 3:14 PM, Chris Gamache wrote: That wipes my shared configuration each time a new library tries to instantiate Cayenne. I need to add to the already initialized Cayenne if Cayenne has been initialized, and the only way to determine if Cayenne has already been initialized

Re: MS SQL Server: Select Distinct on text datatype

2008-08-04 Thread Andrus Adamchik
Andrey, you are spot on with the UNSUPPORTED_DISTINCT_TYPES. Here is one caveat (and hopefully a workaround). text is a SQL Server native type; UNSUPPORTED_DISTINCT_TYPES stores abstract JDBC types. So I think Matthias can simply map his text column as a CLOB in Cayenne, and Cayenne will

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Andrus Adamchik
org.apache.derby.impl.jdbc.EmbedSQLException An attempt was made to get a data value of type 'VARCHAR' from a data value of type 'CLOB'. [java] at org .apache .cayenne .remote .service.BaseRemoteService.processMessage(BaseRemoteService.java:204) [java] ... 25 more On 05/08/2008, at 6:49 AM, Andrus Adamchik wrote

Re: MS SQL Server: Select Distinct on text datatype

2008-08-05 Thread Andrus Adamchik
On Aug 5, 2008, at 8:27 PM, Lachlan Deck wrote: Any objections to adding (or making) isUnsupportedForDistinct non- static? i.e., assuming that SelectTranslator can be overridden. I don't have any objections per se, but can you elaborate how that can help in your situation? Andrus

Re: SQLTemplate and setPageSize()

2008-08-06 Thread Andrus Adamchik
On Aug 6, 2008, at 11:26 AM, Andrus Adamchik wrote: Not quite sure why the root is null. Actually I have a few suspicions why this is happenning, and this may be a bug. Care to log a bug report in Jira? https://issues.apache.org/cayenne/ In the meantime you can use a workaround

Re: Using relationship != null qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
Could you post a bigger part of the stack trace (at least everything that has org.apache.cayenne in it)? From what I can see, this is related to in-memory evaluation of the qualifier. If that's a to-one relationship based on FK, intuitively this should work, but it probably hits a

Re: Using relationship != null qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
On Aug 6, 2008, at 2:54 PM, Dave Dombrosky wrote: Do I have to add another column just to hold the type like the documentation example shows? Not the best solution in this case, but I guess it can be done if need be. That would certainly work. Andrus

Re: Using relationship != null qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
columns of the root table. Andrus On Aug 6, 2008, at 3:00 PM, Andrus Adamchik wrote: On Aug 6, 2008, at 2:54 PM, Dave Dombrosky wrote: Do I have to add another column just to hold the type like the documentation example shows? Not the best solution in this case, but I guess it can be done

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-07 Thread Andrus Adamchik
On Aug 7, 2008, at 10:27 AM, Chris Gamache wrote: Okay, I have created the bug with the proposed title. Thanks! I have a eclipse project with a JUnit test which demonstrates the problem which I can send to you if that will assist you in finding the problem. That would help. You can

Re: NUMERIC default scale behaves differently on Derby SQL Server

2008-08-11 Thread Andrus Adamchik
On Aug 9, 2008, at 12:18 PM, Øyvind Harboe wrote: I guess the problem I see is that I test only against one or two databases so I'd rather see the *same* behaviour across databases regardless of what JDBC is defined to do... I understand. We flipped scale=2 for all our NUMERIC types

Re: ObjEntity.translateToDbPath

2008-08-13 Thread Andrus Adamchik
On Aug 13, 2008, at 11:05 AM, Lachlan Deck wrote: I get the following complaining about the asterix '*'. Is that a bug? No this is not a bug. This is a spec feature. Do count(a) instead. Andrus

Re: ObjEntity.translateToDbPath

2008-08-14 Thread Andrus Adamchik
the IndirectQuery inheritance in your example. Such superclass would've been needed if you'd run this query with Cayenne, but instead you are using your own queryResult method that creates a substitute query. Andrus On Aug 14, 2008, at 12:30 AM, Lachlan Deck wrote: On 14/08/2008, at 7:02 AM, Andrus

Re: PK ID retrieval code generation seems to fail

2008-08-18 Thread Andrus Adamchik
Which version of Cayenne is this? I vaguely recall a bug that we fixed already... Andrus On Aug 18, 2008, at 7:16 PM, John Armstrong wrote: Hi Ari, I am only using the model tool as specified in the wiki (http://cwiki.apache.org/CAY/mapping-primary-keys.html), no custom templates or

Re: PK ID retrieval code generation seems to fail

2008-08-18 Thread Andrus Adamchik
Are there Modeler warnings saying the type not being set? What is the Java type of the id attribute? Andrus On Aug 18, 2008, at 7:20 PM, John Armstrong wrote: 3.0M4 on MacOS X (using the native tool). J On Mon, Aug 18, 2008 at 9:19 AM, Andrus Adamchik [EMAIL PROTECTED] wrote: Which

Re: PK ID retrieval code generation seems to fail

2008-08-19 Thread Andrus Adamchik
: Type is int Modeler gives no warnings at all. I can send a screen cast or any other config info you might need? John- On Mon, Aug 18, 2008 at 10:47 PM, Andrus Adamchik [EMAIL PROTECTED] wrote: Are there Modeler warnings saying the type not being set? What is the Java type of the id

Re: QueryChain

2008-08-20 Thread Andrus Adamchik
Hi Eric, 'performQuery' method will only return the first result set, no matter how many results you have in the query. To get all results, you will need to use a different method for select: QueryResponse result = context.performGenericQuery(query); Then you can scan vis the

Re: Handling of database NULL - default value column to modeler?

2008-08-20 Thread Andrus Adamchik
So this is not about syncing with DB defaults? Then I think that's over-engineered. Would it be easier to simply override needed getters per entity class and do return super is null ? defaultVal : super, without changing Cayenne core? Andrus On Aug 20, 2008, at 12:46 PM, Øyvind Harboe

Re: Handling of database NULL - default value column to modeler?

2008-08-20 Thread Andrus Adamchik
On Aug 20, 2008, at 4:34 PM, Øyvind Harboe wrote: On Wed, Aug 20, 2008 at 2:44 PM, Andrus Adamchik [EMAIL PROTECTED] wrote: So this is not about syncing with DB defaults? Nope. Then I think that's over-engineered. Would it be easier to simply override needed getters per entity class and do

Re: DbGenerator vs. MergeContext

2008-08-22 Thread Andrus Adamchik
Interesting... I am not using either for anything complex lately, preferring manual SQL scripts executed with dbpatch Ant task, so I am a bit out of the loop. So Tore, would you consider the merge package a logical superset of DbGenerator (even though not all features are there yet)? Or is

Re: Caching query results

2008-08-24 Thread Andrus Adamchik
2006/9/25 Andrus Adamchik [EMAIL PROTECTED] Until 3.0 invalidating query lists was totally up to the developer. In 3.0 we added three things - RefreshQuery (mentioned by Ari), query cache group concept, and pluggable QueryCache. This makes clustering and refresh policy management much simpler

Re: EJBQLQuery with date parameter

2008-08-25 Thread Andrus Adamchik
It's a bug. Let me Jira it and see if we can fix it. Andrus On Aug 25, 2008, at 7:26 AM, Steve Wells wrote: Just started trying the EJBQLQuery and ran into trouble with date type parameters using C3M4, hsql EJBQLQuery query = new EJBQLQuery(select count(e), e.toDocType.marketplaceDocType

Re: EJBQLQuery with date parameter

2008-08-25 Thread Andrus Adamchik
Fixed on trunk: https://issues.apache.org/cayenne/browse/CAY-1098 Will be a part of M5. Andrus On Aug 25, 2008, at 5:21 PM, Andrus Adamchik wrote: It's a bug. Let me Jira it and see if we can fix it. Andrus On Aug 25, 2008, at 7:26 AM, Steve Wells wrote: Just started trying the EJBQLQuery

Re: Stateless server (GWT)

2008-08-27 Thread Andrus Adamchik
Hi Krzysztof, You can switch to Cayenne 3.0M5. It uses weak references and will prevent objects in the ObjectStore from accumulating. Or throw away the context at the end of the request or after N requests. Andrus On Aug 27, 2008, at 2:23 PM, Krzysztof Janowicz wrote: Hi, I am playing

Re: Stateless server (GWT)

2008-08-27 Thread Andrus Adamchik
per request very ineffective (see http://cayenne.apache.org/doc/obtaining-datacontext.html)? Cayenne 3.0M5 is the version from SVN (or a nightly build), right? I will try this one, thanks again. Krzysztof Andrus Adamchik schrieb: Hi Krzysztof, You can switch to Cayenne 3.0M5. It uses weak

Re: DbMerger/MySQL compatibility

2008-08-28 Thread Andrus Adamchik
Not sure if that's helpful at all, but we have a mechanism to detect the default table type on a given DB. See MySQLSniffer for details (SHOW VARIABLES LIKE 'table_type'). Maybe not that helpful, as (1) it is not using metadata, but rather a MySQL specific command and (2) DB default

Re: Rolling back changes in ROP does seem to work

2008-09-04 Thread Andrus Adamchik
Hi Tarik, You are right, this is a bug in Cayenne. I can reproduce it. Let me Jira it and see what we can do. Andrus On Sep 1, 2008, at 10:10 PM, Tarik wrote: I'm trying to roll back a transaction in ROP but strangely, none of changed values get reverted. Am I missing something basic

Re: ClassCastException, Cayenne 2.0.4

2008-09-07 Thread Andrus Adamchik
Hi Ian, I just checked out the code from the repo and used the model to create a local DB and a local test project. This seems to work for me with the test data that I inserted manually: Expression e = ExpressionFactory.matchExp( DbAddress.POSTAL_CODE_PROPERTY, 0);

Re: ClassCastException, Cayenne 2.0.4

2008-09-07 Thread Andrus Adamchik
had a signature of public ListDbPersonAddress getAddresses(), hinting to a type mismatch.) HTH, Andrus On Sep 7, 2008, at 9:22 PM, Ian Boston wrote: On 7 Sep 2008, at 15:17, Andrus Adamchik wrote: Hi Ian, I just checked out the code from the repo and used the model to create a local DB

Re: SelectQuery.setFetchLimit() performance

2008-09-10 Thread Andrus Adamchik
I think you are using prefetching, although this is not shown in your example. Otherwise why would Cayenne go after a related entity data. Unfortunately you when using prefetching with a fetch limit, the fetch limit is only applied to the root query. This is not a bug, this is needed for

Re: Stack overflow with Derby adapter

2008-09-12 Thread Andrus Adamchik
This is a known problem on Derby. If this happens inside a paginated list, here is a workaround (that needs to be ported to the adapter at some point) : ((IncrementalFaultList) list).setMaxFetchSize(1000); // 1000 is just a random #, you'll need to play with this parameter to optimize it

Re: Stack overflow with Derby adapter

2008-09-12 Thread Andrus Adamchik
No. And I can't think of a reasonable solution that we can implement on our end. Andrus On Sep 12, 2008, at 11:43 AM, Øyvind Harboe wrote: On Fri, Sep 12, 2008 at 10:23 AM, Andrus Adamchik [EMAIL PROTECTED] wrote: This is a known problem on Derby. If this happens inside a paginated list

Re: Cayenne, XML objects and JDBC 4

2008-09-13 Thread Andrus Adamchik
Hi Stephen, Yes, JDBC 4 support is not in Cayenne yet, but I'd very much love to get it going asap. The thing is - most of the Cayenne developers are working on Macs and there's no Java 1.6 for older 32 bit Mac hardware, so we were slow to jump on it (I do have a 64 bit laptop now

Re: delete from ... where ... in (...)

2008-09-26 Thread Andrus Adamchik
Replying a little late... We just tested this case and it works. So there maybe a user error involved on your end. Andrus On Jul 24, 2008, at 12:27 PM, Borut Bolčina wrote: Hi, the database is MySQL 5.0.45, the driver is jConnector 5.1.6. 2008/7/24 Andrus Adamchik [EMAIL PROTECTED

Re: Insert at a particular position in the detail list

2008-09-26 Thread Andrus Adamchik
On Sep 26, 2008, at 2:41 AM, Chris Murphy wrote: Wouldn't it be a good idea for the generated methods to have the extra int argument? It is a bit more involved than that. The problem with including this in Cayenne is that it won't work in a more general case. E.g. if you add an object

Re: Insert at a particular position in the detail list

2008-09-26 Thread Andrus Adamchik
relationships that way, it would allow them to add the sort information to the join table, which has no object corollary so your object model is uncluttered. Robert On Sep 26, 2008, at 9/269:48 AM , Andrus Adamchik wrote: On Sep 26, 2008, at 2:41 AM, Chris Murphy wrote: Wouldn't

Re: Insert at a particular position in the detail list

2008-09-26 Thread Andrus Adamchik
That's a good point - we are trying to bridge the gap between OO and RDB worlds in a best possible way. And I wish we could do a reasonable ordering implementation (and without a join table). Otherwise the java.util.List contract is indeed broken. Andrus On Sep 26, 2008, at 10:39 PM,

Re: ROP - server DOs to client DOs failure

2008-09-30 Thread Andrus Adamchik
Can't say for sure what this is, but can you try it with 3.0? BTW, 3.0 supports direct mapping of primitive booleans (boolean for the ObjAttribute; BOOLEAN for the DbAttribute; TINYINT in MySQL) Andrus On Sep 30, 2008, at 8:10 AM, Chris Murphy wrote: I have a problem that occurs when a

Re: ROP - server DOs to client DOs failure

2008-09-30 Thread Andrus Adamchik
getMonthlyRestart() , but on the server version it is: public boolean isMonthlyRestart() Shouldn't the signatures be the same? thanks - Chris Andrus Adamchik wrote: Can't say for sure what this is, but can you try it with 3.0? BTW, 3.0 supports direct mapping of primitive booleans (boolean

Re: Using one template datamap for many databases

2008-10-01 Thread Andrus Adamchik
Hi Jesper, You would definitely need multiple DataDomains, one per cloned database. However I think you can reuse EntityResolver object (and the DataMap that it stores). So you can do something like that to roll out a new database stack: DataDomain mainDomain = ... // this one is loaded

Fwd: CFP open for ApacheCon Europe 2009

2008-10-02 Thread Andrus Adamchik
FYI: (BTW, is anybody on this list planning to attend ApacheCon EU 2009?) Andrus Begin forwarded message: If you only have thirty seconds: The Call for Papers for ApacheCon Europe 2009, to be held in Amsterdam, from 23rd to 27th March, is now open! Submit your proposals at

Re: Any other ROP examples?

2008-10-09 Thread Andrus Adamchik
Hi Tarik, We have a Jira to fix that... Hopefully we'll get to it rather sooner than later. https://issues.apache.org/cayenne/browse/CAY-1103 Andrus On Oct 8, 2008, at 7:16 PM, Tarik wrote: Hey Ari, I have a question for you. Have you found any ways to go around the fact that

Re: Cayenne, XML objects and JDBC 4

2008-10-10 Thread Andrus Adamchik
We did some research on SQLXML. The summary is this: whatever JDBC4 compatibility claims various driver vendors are making, none of them includes actual support for SQLXML (with a possible exception of DB2). Whatever support you saw in other tools is probably just treating those columns as

Re: Talking to multiple database types with Cayenne.

2008-10-20 Thread Andrus Adamchik
Hi Michael, Cayenne will detect the database type automatically on startup and use the right adapter. So yes, use JNDI to abstract connection information, beyond that no need for any extra tricks. You generic Cayenne mapping will just work regardless of the db type. Andrus On Oct 20,

Re: cayenne-tutorial

2008-10-26 Thread Andrus Adamchik
Hi Matt, On Oct 25, 2008, at 6:33 PM, Matt Crouch wrote: I have several questions about the cayenne-tutorial project and CayenneModeler 1. I'm having some problems with the UI in CayenneModeler. When adding an attribute, I tab over to Type and expect that I can select using arrow keys or

Re: cayenne-tutorial

2008-10-26 Thread Andrus Adamchik
Hi Theresa, On Oct 26, 2008, at 7:43 AM, [EMAIL PROTECTED] wrote: I have expanded my tutorial to create more examples using all of the different Cayenne features, and am now having a problem with toArtist.Artist_Name. Artist_Name is really name, but more puzzling is why I cannot seem to

Re: cayenne-tutorial

2008-10-26 Thread Andrus Adamchik
is cayenne-2.0.x/doc/index.html). Andrus On Oct 26, 2008, at 9:15 AM, Andrus Adamchik wrote: Hi Matt, On Oct 25, 2008, at 6:33 PM, Matt Crouch wrote: I have several questions about the cayenne-tutorial project and CayenneModeler 1. I'm having some problems with the UI in CayenneModeler. When

Re: Diacritics removed

2008-10-27 Thread Andrus Adamchik
There's no special Cayenne functions to do that. So you will have to look at the underlying DB facilities, and tweak those. For instance I know that MySQL, when created with UTF-8 encoding, matches German umlauts against their non umlaut counterparts (e.g.: a == ä), which I always

Re: Teradata + Cayenne

2008-10-28 Thread Andrus Adamchik
Yep, the first thing to check is whether there is a JDBC driver for Teradata. If there is, you should be ok for most things. Andrus On Oct 28, 2008, at 12:26 PM, John Armstrong wrote: Wouldn't plain old JDBC work? I use JDBC adapter with Firebird in production and it seems to work pretty

Re: MySQL, DbGenerator and auto_increment

2008-11-05 Thread Andrus Adamchik
-relationship-path=toUserRole.toUser/ obj-relationship name=toUserRole source=User target=Role db-relationship-path=toUserRole.toRole/ /data-map Please advise, Borut 2008/7/16 Andrus Adamchik [EMAIL PROTECTED] Yes, auto increment flags are added to PK columns by Cayenne. Just set PK

Re: restricting qualifiers turned off?

2008-11-11 Thread Andrus Adamchik
On Nov 11, 2008, at 2:15 PM, Andrey Razumovsky wrote: ObjEntity clone = (ObjEntity) SerializationUtils.clone(objEntity); clone.setDeclaredQualifier(null); SelectQuery query = new SelectQuery(clone); In addition you'll need to rename the entity and register it with the DataMap. So you might

Re: restricting qualifiers turned off?

2008-11-11 Thread Andrus Adamchik
between the app and the DB. Andrus On Nov 11, 2008, at 3:45 PM, Lachlan Deck wrote: On 11/11/2008, at 11:42 PM, Andrus Adamchik wrote: On Nov 11, 2008, at 2:30 PM, Lachlan Deck wrote: Yeah and should you share that model in a framework/lib between more than one app it really needs

Re: restricting qualifiers turned off?

2008-11-11 Thread Andrus Adamchik
I am not a big fan of entity qualifiers for things other than inheritance, as sooner or later you'd end up trying to work around it to get data they are hiding. And there's no way to just turn them off... Anyways, entity cloning hack should work, but may require some tweaking. So what

Re: restricting qualifiers turned off?

2008-11-11 Thread Andrus Adamchik
On Nov 11, 2008, at 2:30 PM, Lachlan Deck wrote: Yeah and should you share that model in a framework/lib between more than one app it really needs to be optional. I really don't see how you can make it optional. Entity qualifier is not optional by design. It is either mapped or not. I

Re: DataRow to CDO comparison

2008-11-14 Thread Andrus Adamchik
Yeah, 'objectFromDataRow' is intended for backend updates of the data objects, so it works under assumption that the data in the DataRow is a DB data, and after a refresh, the object is still COMMITTED. So do you want to compare the values or actually apply all changes to the object with

Re: DataRow to CDO comparison

2008-11-14 Thread Andrus Adamchik
{ local.writeProperty(rel.getName(), null); } } } } I'm sure I can improve it somehow.. 2008/11/14, Andrus Adamchik [EMAIL PROTECTED]: Yeah, 'objectFromDataRow' is intended for backend updates of the data objects, so it works under assumption that the data in the DataRow is a DB data

Re: Include modeler.bat back in the distribution?

2008-11-16 Thread Andrus Adamchik
How about this: We test things on Vista and see what we can do to make the exe work (appreciate a Jira on that), and you can write you own .bat for your own use. It should be as simple as java -jar CayenneModeler.jar. See no point for us to include a .bat unless we confirm that our .exe

Re: Include modeler.bat back in the distribution?

2008-11-18 Thread Andrus Adamchik
(forwarding to user@ list) On Nov 18, 2008, at 10:43 AM, Andrey Razumovsky wrote: I've run modeler under Java 5 Update 4 and Java 6. Aero works under Java 6. I've had no time yet to test Java 5 Update 15 or something. Demetrios, the issue seems to be caused my java settings in your

Re: Date of next release?

2008-11-19 Thread Andrus Adamchik
! glad to see cayenne in this project. I just want to place my Jira CAY-1112 before tagging M5 ;) I think it's a 'critical' bug, because i get TRANSIENT objects from relationships laurent. Andrus Adamchik wrote: Hi Borut, Nice site :-) M5 is coming out soon. As far as I can tell

Re: Using Cayenne with RCP and Birt?

2008-11-25 Thread Andrus Adamchik
Hi Lawrence, Don't recall BIRT being mentioned on this list. You could be the first one to try it (?) Andrus On Nov 25, 2008, at 3:02 AM, Lawrence Gerstley wrote: Hello, I've been using Cayenne with great success in making a variety of RCP applications. I'm trying to integrate in BIRT

Re: Maven plugins

2008-11-27 Thread Andrus Adamchik
From what I can tell, cdbgen was added only in Cayenne 3.0 M5 (which will hopefully be released within a week). The site docs have already been updated, but the M4 docs still don't have it. Andrus On Nov 28, 2008, at 6:44 AM, Steve Wells wrote: Hi, I just started trying to use the maven

Re: Problem with cayenne accessing mixed tables in Postgresql

2008-12-05 Thread Andrus Adamchik
Interesting... Seems to be working for me. 1. I created a test project in CayenneModeler 2.0.4. Here is how the double quotes are saved - this is valid XML, and it loads back ok: data-map project-version=2.0 db-entity name=quot;testquot; /db-entity /data-map 2. Since I don't

Re: Sequence postgres.

2008-12-05 Thread Andrus Adamchik
Pierre is absolutely right. PostgreSQL will work the same way as Oracle in this respect. Default strategy is based on Cayenne- generated PK sequences with a step of 20, but you can change that with Custom Sequence strategy. Andrus On Dec 5, 2008, at 3:14 PM, Pierre Lavignotte wrote:

Re: Latest code snapshot breaks EJBQLQuery

2008-12-05 Thread Andrus Adamchik
Yeah, this part of the stack has undergone a major rework lately. Although the fact that you had to use this workaround to begin with is already suspect. Let me try this query out and see what's going on. Andrus On Dec 5, 2008, at 9:52 AM, Dave Dombrosky wrote: A query that runs fine for

Re: Latest code snapshot breaks EJBQLQuery

2008-12-09 Thread Andrus Adamchik
hack repeating the last attribute twice was related to this bug or not, but now it works for me without any such hack. Andrus On Dec 5, 2008, at 4:18 PM, Andrus Adamchik wrote: Yeah, this part of the stack has undergone a major rework lately. Although the fact that you had to use

Re: Latest code snapshot breaks EJBQLQuery

2008-12-09 Thread Andrus Adamchik
On Dec 10, 2008, at 8:02 AM, Andrus Adamchik wrote: Ok, this turned to be some stupid EJBQL spec limitation that we followed verbatim. I take this back. 'single_valued_path_expression' can end in relationship: single_valued_path_expression ::= state_field_path_expression

Re: Proper use of nesting DataContexts in RCP

2008-12-11 Thread Andrus Adamchik
Hi Lawrence, Now, I don't think that I want to move CONCEPT1 to the DIALOGCHILDCONTEXT when I open the dialog--doesn't that mean that Actually that's exactly what you want to do. Don't think of it as move though, think of it as getting a clone of the original object, kind of like an SVN

Re: Generated relationship names

2008-12-16 Thread Andrus Adamchik
The new reverse engineering dialog has a naming strategy dropdown with choices of org.apache.cayenne.access.reveng.BasicNamingStrategy and org.apache.cayenne.modeler.util.SmartNamingStrategy. I've never tried the smart one yet (so not sure how it names the relationships), but now we have

Re: Generated relationship names

2008-12-16 Thread Andrus Adamchik
://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database 2008/12/16 Borut Bolčina borut.bolc...@gmail.com Oh lord! It does exactly what I want! -Borut 2008/12/16 Andrus Adamchik and...@objectstyle.org The new reverse engineering dialog has a naming strategy dropdown with choices

Re: Two tables with the same name in two different data model !

2008-12-19 Thread Andrus Adamchik
Here is a link to a similar discussion that happened recently: http://markmail.org/message/ihe7hf2sfzllda7a It acknowledges the limitation and suggests a workaround. Let me actually Jira the problem. Andrus On Dec 18, 2008, at 4:59 PM, Marc Gabriel-Willem wrote: Dears, We are facing

Re: query_governor_cost_limit setting not working with cayenne?

2008-12-20 Thread Andrus Adamchik
Hi Kathy, Which version of Cayenne is that? Also do you have a working JDBC example - maybe I can try to reproduce it and compare to Cayenne. Andrus On Dec 20, 2008, at 1:08 AM, KathyS wrote: Hello, I'm retrofitting an existing project to use Cayenne back end. We use SQL Server, and

Re: query_governor_cost_limit setting not working with cayenne?

2008-12-20 Thread Andrus Adamchik
Actually I think I already have sufficient information to try it out. Still information about Cayenne version may be important. Andrus On Dec 20, 2008, at 10:22 AM, Andrus Adamchik wrote: Hi Kathy, Which version of Cayenne is that? Also do you have a working JDBC example - maybe I can

Re: query_governor_cost_limit setting not working with cayenne?

2008-12-20 Thread Andrus Adamchik
On Dec 20, 2008, at 4:48 PM, KathyS wrote: JDBC code is straightforward: Statement stmnt = con.createStatement(); stmnt.execute(SET query_governor_cost_limit 2); The only difference with Cayenne internal execution path would be that Cayenne will use PreparedStatement here. Anyways, I

Re: Support for MySQL 5.x VIEWs

2008-12-21 Thread Andrus Adamchik
The method that you've mentioned is only used during DB reverse engineering. So if you map a view as a regular DbEntity in the modeler yourself, running queries against the view should work just fine. (we still need to update this method in the adapter, as most people are on MySQL 5 by now

Re: query_governor_cost_limit setting not working with cayenne?

2008-12-21 Thread Andrus Adamchik
On Dec 21, 2008, at 4:16 PM, KathyS wrote: Related question, if you have time. How can I hook onto connection creation in the pool? I'd love to be able to run the set ..cost statement for each new connection. This is also fairly straightforward. Cayenne uses a javax.sql.DataSource

Re: Changing database schemas at runtime

2009-01-05 Thread Andrus Adamchik
Hi Lawrence, Yeah, the default schema is ignored in runtime, and only per DbEntity schema is consulted. Looking back, it would've been better to use the default if DbEntity schema is not set, and we may change the behavior at some point, but for now default schema is only used by the

Re: ExpressionFactory Usage?

2009-01-08 Thread Andrus Adamchik
On Jan 8, 2009, at 6:50 PM, Dave Merrin wrote: I did as you suggested and gave the Expression.fromString() a try and this worked. Great! My memory was a bit rusty on this one. Andrus

Re: nested contexts

2009-01-13 Thread Andrus Adamchik
On Jan 13, 2009, at 7:30 AM, Marcin Skladaniec wrote: I think it is a bug, and relating objects should be allowed between parent/child contexts. Not so. Parent/child relationship determines the path of the select and commit operations, but has no effect on the rule that each object

Re: nested contexts

2009-01-13 Thread Andrus Adamchik
On Jan 13, 2009, at 1:26 PM, Aristedes Maniatis wrote: I think it is a bug, and relating objects should be allowed between parent/child contexts. Not so. Parent/child relationship determines the path of the select and commit operations, but has no effect on the rule that each object

Re: nested contexts

2009-01-13 Thread Andrus Adamchik
IIRC there were some locking jiras, but they will be treated as bugs, not as limitation by design. Andrus On Jan 13, 2009, at 2:29 PM, Aristedes Maniatis wrote: On 13/01/2009, at 11:09 PM, Andrus Adamchik wrote: On Jan 13, 2009, at 1:26 PM, Aristedes Maniatis wrote: I think

Re: How to?

2009-01-16 Thread Andrus Adamchik
Hi Sid, Two possible approaches: 1. (preferred) matching on a related object. That's the point of ORM after all to work with objects, not DB keys. 2. If this is not possible, you can use the same approach as with PK matching. The only difference is that there's no generated constant for

Re: How to?

2009-01-16 Thread Andrus Adamchik
(UsuariosClientes.CD_CLIENTE_PK_COLUMN, this.cdCliente)); Didn't worked... On Fri, Jan 16, 2009 at 8:38 AM, Andrus Adamchik and...@objectstyle.org wrote: Hi Sid, Two possible approaches: 1. (preferred) matching on a related object. That's the point of ORM after all to work with objects, not DB keys. 2

Re: How to?

2009-01-16 Thread Andrus Adamchik
I suspect the case here is a search based on related object (client) (?). So here Sid should map a relationship between users and client and use this relationship to fetch the users, or in more advanced cases, in a qualifier of the query. Sid, let us know if you need an explanation on any

Re: How to?

2009-01-16 Thread Andrus Adamchik
this! On Fri, Jan 16, 2009 at 11:19 AM, Andrus Adamchik and...@objectstyle.org wrote: On Jan 16, 2009, at 3:14 PM, Sid Ferreira wrote: Dude, of course I agree that the correct is to get the client and ask for it's users wich login is like the parameter I sent.But, if I can't simply

Re: How to?

2009-01-16 Thread Andrus Adamchik
On Jan 16, 2009, at 3:35 PM, Sid Ferreira wrote: a long And what SQL did it generate? Was there an exception? Andrus

Re: SQL domain types in Cayenne

2009-01-18 Thread Andrus Adamchik
Hi Steve, Cayenne won't pick up domain types on reverse engineering, but I suspect that whatever type is picked by Cayenne, it will work (i.e. Cayenne will be able to save and load a column value). Trying to see why it can be helpful to have a concept of a domain type in Cayenne. If I

Re: Mapping primary keys getter methods

2009-01-23 Thread Andrus Adamchik
Never mind, I just did: https://issues.apache.org/cayenne/browse/CAY-1174 Andrus On Jan 23, 2009, at 9:43 AM, Andrus Adamchik wrote: +1 on adding this option to the Modeler. Somebody please open a Jira. Andrus On Jan 22, 2009, at 10:23 PM, Mike Kienenberger wrote: I think Martin's issue

Fwd: Re-Broadcast Request

2009-01-23 Thread Andrus Adamchik
FYI Begin forwarded message: From: Tony Stevenson pct...@apache.org Date: January 23, 2009 3:28:19 PM GMT+02:00 To: travel-assista...@apache.org Subject: [Travel Assistance] Applications for ApacheCon EU 2009 - Now Open The Travel Assistance Committee is now accepting applications for

Fwd: Registration for ApacheCon Europe 2009 is now open!

2009-01-27 Thread Andrus Adamchik
ApacheCon Europe is coming. If you register by February 6, you can get a discounted price. There's no Cayenne tracks, which is a shame, but otherwise there's a bunch of interesting things there. (me, I was going to attend, but then changed my mind due to some other conflicting plans...

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Andrus Adamchik
I guess that's how Oracle driver returns the metadata for the DATE column in the ResultSet. The workaround is to use #result() directive in the SQL: http://cayenne.apache.org/doc20/scripting-sqltemplate.html Hope this helps, Andrus On Jan 28, 2009, at 4:48 PM, Alessio Giovanni Baroni

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Andrus Adamchik
Modeler-DATE? Joe On Jan 28, 2009, at 9:58 AM, Andrus Adamchik wrote: I guess that's how Oracle driver returns the metadata for the DATE column in the ResultSet. The workaround is to use #result() directive in the SQL: http://cayenne.apache.org/doc20/scripting-sqltemplate.html Hope

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Andrus Adamchik
set the field Foo as Date, isn't an error cast it to java.lang.Timestamp?? Thanks. 2009/1/28 Andrus Adamchik and...@objectstyle.org My (admittedly novice) solution was to map it via Modeler to a TIMESTAMP. This is actually a correct solution. Only if I am not mistaken it doesn't work

Re: How to create Meaningful Primary Keys?

2009-02-02 Thread Andrus Adamchik
And to add to that, it is perfectly valid to manually create an ObjAttribute in the Modeler for plate_num to make it an object property, even though it's a PK. Cayenne doesn't do it by default, but the user can still map it if there is a need. In fact the upcoming 3.0M6 will even have this

Re: problem with m:n relationship

2009-02-04 Thread Andrus Adamchik
Yes, the issues with auto-reverse relationships need to be fixed rather sooner than later, and to the best of my knowledge nobody is working on it right now. But this is certainly high on the list. Andrus On Feb 3, 2009, at 11:39 PM, Stephen Winnall wrote: Is CAY-1009 (Bogus runtime

Re: Encrypted Fields

2009-02-07 Thread Andrus Adamchik
One-way hashing works great for passwords (and is in fact THE way to store passwords in the DB). It doesn't work for anything else, as usually you do want to have access to the data you've encrypted. Andrus On Feb 7, 2009, at 8:50 PM, Dov Rosenberg wrote: One of our customers who is big

Re: problem with m:n relationship/inheritance

2009-02-08 Thread Andrus Adamchik
goes away. Is there an easier way to recognise which attribute is causing the problem? Is it a problem with the DB entity or with the object entity? Steve On 4 Feb 2009, at 09:42, Andrus Adamchik wrote: Yes, the issues with auto-reverse relationships need to be fixed rather sooner than

Re: Cayenne + master/slave mysql database replication

2009-02-09 Thread Andrus Adamchik
Interesting... I am using a similar setup with MySQL (a master and a bunch of slaves), however we split the code into read-only and read/ write webapp modules and use separate URL's for each type. In addition to proper load balancing, this adds a layer of security (apps that are read-only

Re: problem with m:n relationship/inheritance

2009-02-09 Thread Andrus Adamchik
, Andrus Adamchik wrote: I am not 100% sure your problem is related to CAY-1009. IIRC CAY-1009 describes a very special case that did not work. In most cases n:m relationships work just fine. So can you describe your problems in more detail? Anything special in your mapping that makes you think

Re: Auditing SQL queries

2009-02-10 Thread Andrus Adamchik
On Feb 11, 2009, at 1:19 AM, Laurent Marchal wrote: Yeah i agree that table/field/date/old value/new value is clearer, but it seems complex to me to have old/new values. Currently this can be done by listening to org.apache.cayenne.access.event.SnapshotEvent on the DataRowStore (this

Re: Commits not visible across contexts in ROP

2009-02-12 Thread Andrus Adamchik
On Feb 13, 2009, at 7:43 AM, Tarik Cherkovi wrote: How are people getting around it if at all? Just to doublecheck, you are talking about separate client applications running on different client machines? Such synchronization works and is a part of the ROP design. It requires a setup

Re: First time writer/Design ideas

2009-03-02 Thread Andrus Adamchik
Hi Dave, Good to see that you liked Cayenne. Some comments in addition to what Ari said... On Mar 1, 2009, at 1:38 PM, Dave Lamy wrote: So Question #1: What pitfalls/concerns would you voice regarding a completely programmatic Configuration/DataMap buildup? The plan is for the entire

<    1   2   3   4   5   6   7   8   9   10   >