You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by to...@apache.org on 2006/09/18 22:08:15 UTC

svn commit: r447532 - /incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m

Author: torehalset
Date: Mon Sep 18 13:08:14 2006
New Revision: 447532

URL: http://svn.apache.org/viewvc?view=rev&rev=447532
Log:
 * hard-code username/password in hessian url
 * output generated core data model

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m?view=diff&rev=447532&r1=447531&r2=447532
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CAYClient/AppController.m Mon Sep 18 13:08:14 2006
@@ -28,6 +28,8 @@
 #import <CocoaCayenne/CAYEntityResolver.h>
 #import <CocoaCayenne/CAYCocoaCayenne.h>
 #import <CocoaCayenne/CAYClientConnection.h>
+#import <CocoaCayenne/CAYDataMap.h>
+#import <CocoaCayenne/CAYDataMapIO.h>
 
 @implementation AppController
 
@@ -42,7 +44,9 @@
     {
         NSLog(@" *** initing cayenne client *** ");
         
-        NSURL * url = [NSURL URLWithString:@"http://localhost:8090/cayenne-service"];
+        // TODO: user interface for username/password
+        // NSURL * url = [NSURL URLWithString:@"http://localhost:8080/cayenne-service"];
+        NSURL * url = [NSURL URLWithString:@"http://cayenne-user:secret@localhost:8080/cayenne-service"];
         CAYClientConnection *conn = [[CAYHessianConnection alloc] initWithUrl:url];
         [conn connect];
         
@@ -51,6 +55,12 @@
         [conn release];
         [self setObjectContext:ctxt];
         [ctxt release];
+        
+        // test creating core data model:
+        CAYEntityResolver *entityResolver = [[self objectContext] entityResolver];
+        CAYDataMap *dataMap = [[entityResolver maps] objectAtIndex:0];
+        NSManagedObjectModel *coreDataModel = [CAYDataMapIO dataMapAsManagedObjectModel:dataMap entityResolver:entityResolver];
+        NSLog(@"DEBUG: core data model: %@", coreDataModel);
     }
     
 	CAYNamedQuery *query = [[CAYNamedQuery alloc] init];