Re: serialization issue

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 6:54 AM, Tomi NA wrote: I have a couple of questions about this. First, is there any special reason the templates, the DataObject and the ObjectId class don't have a serialVersionUID? We should probably add serialVersionUID to all serializable classes (and somehow add

AW: Default domain in cayenne.xml

2006-05-18 Thread Thilko Richter
Hi Andrus, thanks a lot for the quick answer! Indeed, it seems that I sent the wrong configuration. I will check this issue tomorrow... But, would you say it make sense to declare a default domain in cayenne.xml, in order to get a domain with getDomain() although you have configured more than

Re: AW: Default domain in cayenne.xml

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 1:17 PM, Thilko Richter wrote: But, would you say it make sense to declare a default domain in cayenne.xml, in order to get a domain with getDomain() although you have configured more than one? Unfortunatly I am not so familar with Cayenne concepts ;-) Cayenne domain

RE: Default domain in cayenne.xml

2006-05-18 Thread Gentry, Michael \(Contractor\)
I could see that potentially causing confusion. In some of my apps, I have about 7 DataDomains. I explicitly request the one I want to use based upon the workflow of the application. To me, this leads to less magic when debugging and reading the source code. Of course, you could always

Error when join table spans datamaps

2006-05-18 Thread Mike Kienenberger
Here's an odd error that I've hit for the first time: Caused by: java.sql.SQLException: invalid schema name: ENG_WORK_MGMT in statement [SELECT DISTINCT t0.ACTIVITY_YEAR, t0.BUDGET_CODE, t0.GL, t0.IS_ACTIVE, t0.NAME, t0.OBJ_TYPE, t0.SUB_ACTIVITY, t0.WORK_ORDER, t0.ACTIVITY, t0.ID, t0.WORK_TYPE

Re: Error when join table spans datamaps

2006-05-18 Thread Mike Kienenberger
On 5/18/06, Andrus Adamchik [EMAIL PROTECTED] wrote: Tough one. What DB is that, Oracle? Can you run this query from sqlplus? I'm testing it with HSQLDB. It'll be production on Oracle. On Oracle, I could cheat in this particular case and set up a login that accesses both schemas. I could

Re: Error when join table spans datamaps

2006-05-18 Thread Andrus Adamchik
On May 18, 2006, at 6:28 PM, Mike Kienenberger wrote: But the root problem seems to be that Cayenne should probably not be doing a join this way. There's no guarantee that two DataNodes are running on the same database type, much less in the same database. Maybe it should be changing the

Re: Error when join table spans datamaps

2006-05-18 Thread Mike Kienenberger
On 5/18/06, Mike Kienenberger [EMAIL PROTECTED] wrote: This is my first-pass at solving the problem at the application level Cleaned up version that can go in the Base DataObject class. protected List getToManyRelationshipTheHardWay(String targetPrimaryKey, String joinTable, String

Re: Error when join table spans datamaps

2006-05-18 Thread Mike Kienenberger
On 5/18/06, Andrus Adamchik [EMAIL PROTECTED] wrote: Yeah, things can be simplified in case of relationships (i.e. qualifiers matching a single object). A generic solution that works with an arbitrary qualifier will be substantially more involved. Yeah, I just hit that problem in a

Caching problem?

2006-05-18 Thread Jeff de Vries
Simplified version: I have a parent table and a child table, where the child table has a parent_id column and a status column. I change the status in one of the child records and commit the change. Later, I ask for the child records for the given parent record, but the child record that I