Re: Re[2]: Child context for Web App

2008-03-23 Thread Razumovsky Andrey
Hi again, Pierre! I think i finally understood your problem, forget all i said about nested contexts :) PG> It seems to me that if you want to make relations between objects, they have to be in the same context. Not 100% sure, but i think so. For workaround, you need that localObject() method.

Re[2]: Child context for Web App

2008-03-22 Thread Razumovsky Andrey
Hi Pierre, I haven't actually ever used the 'localObject' method. I mean you can work with nested context the same way as with parent (global) one, i.e: DataContext context = DataContext.createDataContext(); DataContext nested = context.createChildDataContext(); Dicrow d = (Dicrow)nested.newObj

Re: Child context for Web App

2008-03-21 Thread Razumovsky Andrey
Hi Pierre! When you use nested contexts (http://cayenne.apache.org/doc/nested-datacontexts.html), you don't need to manually copy objects between contexts, it collapses to just calling one method. I think that's exactly what you need. Manually calling setObjectContext (and even worse, deprecat

ROP & lifecycle

2008-03-18 Thread Razumovsky Andrey
Hello! I'm using ROP and i want every client to be notified every time persistent object is stored. I know Lifecycle listeners aren't avaliable via ROP, but i need some way to implement this. This may not actually be linked with Cayenne, maybe you could advice any technologies. Any hint would b

Where can i download modeler source code?

2008-03-06 Thread Razumovsky Andrey
If it's unavaliable on web, can someone please email it to me?)

Re: Expressions & objects state

2008-03-04 Thread Razumovsky Andrey
Hi Andrus, AA> to find objects by FK you can match against a relationship target AA> object ObjectId: AA> AA> ExpressionFactory.matchExp("relationshipName", new AA> ObjectId("TargetEntity", "pk", 2); AA> Thanks, this is exactly what i need. However, it doesn't work on client (i mean manual

Expressions & objects state

2008-03-01 Thread Razumovsky Andrey
Hi all, these are actually two separate questions. First is about expressions. Suppose i have two entities, A and B. A has pk 'aid' and fk (non-mandatory) 'bid'. B has pk 'bid'. I want to build two separate expressions for A like those (1) 'aid=1' and (2) 'bid=2'. Since 'aid' and 'bid' are not

Re: State of DataObjects (uncommitted but nonexistent on DB)

2008-03-01 Thread Razumovsky Andrey
Hi Adrian, If i understood your message right, you're manually changing objects' state to COMMITED. Well, i too think this is not a good idea. What would i do in this cause is to make those still non-existing in DB objects using default constructor, so that they would bу TRANSIENT. After that (i

Re[3]: ROP: validation and callbacks

2008-02-27 Thread Razumovsky Andrey
I've found the answer: it turns out that client 'ObjAttribute' descendant, 'ClientObjAttribute' needed validation information. I think it is a good idea to make those 'isMandatory' and 'getMaxLength' methods members of 'ObjAttribute' so that the same validation code would work on client and serv

Re[2]: ROP: validation and callbacks

2008-02-27 Thread Razumovsky Andrey
AA> Answering one of the questions, this is correct - there is no AA> callbacks available on the client. AA> Andrus Understood. About my first question.. I tried to invoke manually validation (forSave) from CayenneDataObject to my client PersistentObject (i.e. to copy-paste the code). Still t

Re[2]: DataObjectUtils.objectForPK() doesn▒t work

2008-02-19 Thread Razumovsky Andrey
Thanks! 574 seems to be the same problem, with exception a bit different though. What is M4 plan release date, by the way? > KM> Hi Andrey, KM> You've run into CAY-574: KM> https://issues.apache.org/cayenne/browse/CAY-574 KM> This issue has been fixed in 3.0-SNAPSHOT and will be in 3.0M4 when that

ROP: DataObjectUtils.objectForPK() doesn't work

2008-02-19 Thread Razumovsky Andrey
Hello! So that's the problem, when i run my simple example: public static void main(String[] args) throws CayenneException { ClientConnection connection = new HessianConnection("http://localhost:8080/cayenne/cws";); DataChannel channel = new Client