Re: more than one ObjEntity mapped to class problem

2008-08-08 Thread Chris Gamache
On Fri, Aug 8, 2008 at 3:08 PM, Andrus Adamchik <[EMAIL PROTECTED]>wrote: > org.apache.cayenne.conf package classes log all startup info. So that can > be used for debugging. Of course if you merge configs by hand, you'd have to > implement your own logging. I guess you're referring to the metho

more than one ObjEntity mapped to class problem

2008-08-08 Thread Chris Gamache
Well, while we're working on the Cayenne 3.0M4 issue, I'm still experiencing this problem using Cayenne 2.0 ... I'm having a terrible time trying to track down this problem. It's most likely in my application code, but I'm having a devil of a time finding it... WARNING: com.package.MyClass.doGet [

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-07 Thread Chris Gamache
> > Since I haven't got nowhere near the cause yet, I can't suggest a good name > either. What's important is that you add steps to reproduce it. Call it > anything you feel like. > > Thanks, > Andrus > > > On Aug 6, 2008, at 1:51 PM, Chris Gamache w

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-06 Thread Chris Gamache
Just a squeak from the wheel here. I'd create a bug report, but I'm not sure how to describe it... Join on ExtendedType invalidates ExtendedType when retrieving rows in parent table using SelectQuery ?? That's one idea I have. Please advise. On Mon, Aug 4, 2008 at 5:55 PM, Chris

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-04 Thread Chris Gamache
On Mon, Aug 4, 2008 at 5:52 PM, Chris Gamache <[EMAIL PROTECTED]> wrote: > > Test #1 and Test #2 fail with the same class cast exception until I > remove this pair of relations from the config file: > Correction: Test #2 and #3 fail, not #1 and #2. :) Details details!

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-04 Thread Chris Gamache
On Mon, Aug 4, 2008 at 3:32 PM, Andrus Adamchik <[EMAIL PROTECTED]>wrote: > > Sure, but can you doublecheck that the types are loaded in the right > Configuration? I.e. after all libraries are loaded, can you grab the shared > configuration and print the contents of the ExtendedTypeMap? > > [BTW,

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-04 Thread Chris Gamache
On Fri, Aug 1, 2008 at 5:23 PM, Andrus Adamchik <[EMAIL PROTECTED]>wrote: > This code looks suspect. I am not sure that after it is run, dc == > Configuration.getSharedConfiguration(). Can you do something like this > instead: > > DefaultConfiguration dc = new DefaultConfiguration(configuration);

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-01 Thread Chris Gamache
wrapper around it for Cayenne to be able to read/write the type and > work with the data. > > Take a look at: > > > http://cayenne.apache.org/doc/api/org/apache/cayenne/access/types/ExtendedType.html > > > On Fri, Aug 1, 2008 at 1:29 PM, Chris Gamache <[EMAIL PROTECTED]> wrote: >

Re: Cayenne 3.0M4 ignoring extended data types

2008-08-01 Thread Chris Gamache
type of problem that exists? On Thu, Jul 31, 2008 at 11:55 PM, Chris Gamache <[EMAIL PROTECTED]> wrote: > Every time I create a DataContext, it gets created with makeContext. I > pass in different the config locations. > > I didn't post the code for PostgresUniqueidentifier or

Re: Cayenne 3.0M4 ignoring extended data types

2008-07-31 Thread Chris Gamache
for doing type translation processing. > > And, do your ExtendedTypes implement ExtendedType? Or subclass > something which does? > > Thanks. > > > On Thu, Jul 31, 2008 at 1:13 PM, Chris Gamache <[EMAIL PROTECTED]> wrote: >> On Thu, Jul 31, 2008 at 12:38 PM,

Re: Cayenne 3.0M4 ignoring extended data types

2008-07-31 Thread Chris Gamache
On Thu, Jul 31, 2008 at 12:38 PM, Michael Gentry <[EMAIL PROTECTED]>wrote: > Could you give an example of how you are using and declaring the > extended types? A lot of work has been done in that department since > 2.x, including adding enumeration support. Sure! public DataContext makeConte

Cayenne 3.0M4 ignoring extended data types

2008-07-31 Thread Chris Gamache
Where do I begin? :) I have a few special data types that I've created ExtendedType classes for. I'm checking out Cayenne 3.0M4 to see if it fixes a problem with an error I've been getting: "Can't perform lookup. There is more than one ObjEntity mapped to class ..." I have multiple cayenne.xml fi

Re: Help! I need the magic no-cache recipe

2008-07-08 Thread Chris Gamache
is run. Please advise. This has moved to a critical deficiency in my application. It is always possible that the problem exists between the keyboard and the chair. Please help me understand how to force Cayenne to exhibit the desired behavior. On Wed, Jun 18, 2008 at 3:57 PM, Chris Gamache

Re: Help! I need the magic no-cache recipe

2008-06-18 Thread Chris Gamache
egular list. > > Robert > > On Jun 18, 2008, at 6/1811:18 AM , Chris Gamache wrote: > >> also :) >> >> How do I deal with a ToManyList prefetch? >> >> I'm getting a ClassCastException trying to cast a ToManyList to a >> DataObject. &g

Re: Help! I need the magic no-cache recipe

2008-06-18 Thread Chris Gamache
also :) How do I deal with a ToManyList prefetch? I'm getting a ClassCastException trying to cast a ToManyList to a DataObject. On Mon, Jun 16, 2008 at 10:36 AM, Chris Gamache <[EMAIL PROTECTED]> wrote: > For clarification: > > DataContext.invalidateObjects(...) Wha

Re: Help! I need the magic no-cache recipe

2008-06-16 Thread Chris Gamache
E.g. > > someQuery.addPrefetch("relatedRows"); > List rows = context.performQuery(someQuery); > > Judging from your example the prefetch option should be exactly what you > need. > > Andrus > > > On Jun 9, 2008, at 11:08 PM, Chris Gamache wrote: >> >> Using Cayen

Help! I need the magic no-cache recipe

2008-06-09 Thread Chris Gamache
Using Cayenne 2.0.3 ... I'm having problems when I use an accessor to get rows from a related table. It pulls fresh data the first time I use the accessor, but if data is modified outside of the Java application, it is not reflected the next time I use the accessor in a different execution stack w

Re: ExtendedType and IN operator

2007-11-29 Thread Chris Gamache
Was this enough code to make a determination? On Nov 27, 2007 4:56 PM, Chris Gamache <[EMAIL PROTECTED]> wrote: > Exact Cayenne Version is 2.0.3 > > Here's the query builder... > >public static List selectMulti(final DataContext context,final > ArrayList u

Re: ExtendedType and IN operator

2007-11-27 Thread Chris Gamache
: > Chris, > > I vaguely remember this being a problem in the past and us fixing > it... I couldn't find any references via Google (having "IN" as a > keyword doesn't help). So could you post the code that builds the > query and the exact Cayenne version. > >

ExtendedType and IN operator

2007-11-22 Thread Chris Gamache
I'm using Cayenne2 and PostgreSQL. For any single R-value in a where clause, my ExtendedType is working wonderfully. But! If I create an expression which uses the operator IN, my ExtendedType doesn't seem to get called. In the query logger everything looks okay, but pgjdbc complains in the same wa

Re: PostgreSQL Money type

2007-10-09 Thread Chris Gamache
On 10/9/07, Michael Gentry <[EMAIL PROTECTED]> wrote: > In the modeler, for the DbEntity, try using the NUMERIC (or maybe even > DECIMAL, but try NUMERIC first) type and for the ObjEntity it should > sync up as a java.math.BigDecimal. Set the scale to 2 (if you want 2 > places after the decimal po

PostgreSQL Money type

2007-10-09 Thread Chris Gamache
Fellow Cayenne users, How do you handle inserting data into columns of type Money? Is there a magic combination of Java type and SQL type? Have you created a Money class and a custom data type converter? CG

Best practices question

2007-10-04 Thread Chris Gamache
Here's the scenario... Project A uses cayenne Project B also uses cayenne They both have a cayenne.xml and nodes and domains, etc. Package A uses package B. I'm finding that when package A first initializes cayenne, subsequent initializations when classes from package B are instantiated ignore t

Re: PostgreSQL custom data type

2007-09-19 Thread Chris Gamache
On 9/19/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > Hi Chris, > > I couldn't find definitive docs on the nature of uniqueidentifier > type (Is there any?) From what little I've found, "uniqueidentifier" > is a binary value. So could you try to map it a Types.VARBINARY on DB > end and "byte[]"

PostgreSQL custom data type

2007-09-18 Thread Chris Gamache
I'm having a terrible time getting Cayenne to properly handle columns of type uniqueidentifier. I can select data from columns which are type uniqueidentifier, but I can not insert. I've tried different combinations of Java type String versus Java type UUID and Types.VARCHAR versus Types.OTHER. Pl