From 2438690d96d59363d70f0274f6a1b8f1aaeb0212 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 21 Jun 2004 13:19:20 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@55 d1b88da0-ebda-0310-925b-ed51d893ca5b --- dbd/DTable.m | 10 ++++++++++ dbd/README | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/dbd/DTable.m b/dbd/DTable.m index 89d303c0..a45f6ce5 100644 --- a/dbd/DTable.m +++ b/dbd/DTable.m @@ -76,6 +76,16 @@ } - (NSArray *)columnNames { + EOModel *model; + NSArray *attributes; + + if (self->columnNames) + return self->columnNames; + + model = [self _describeModel]; + attributes = [[[model entities] lastObject] attributes]; + + self->columnNames = [[attributes valueForKey:@"columnName"] copy]; return self->columnNames; } diff --git a/dbd/README b/dbd/README index 39aa65f8..71e19453 100644 --- a/dbd/README +++ b/dbd/README @@ -89,6 +89,10 @@ Tricks used - note that acquisition is also done on the traversal path! if the lookup returns nil on an URL path being traversed, URL acquisition will occure (except on non-acquisition protocols like WebDAV) + - if you have a path like '/Databases/MyDatabase/MyTable/MyField' and + 'MyField' isn't processed by MyTable (eg not yet implemented), then this + will return a SoDatabase object! - because acquisition will look for + 'MyField' in 'MyDatabase' which will create a SoDatabase. - baseURL - calculation of base URL requires you to either override -baseURLInContext: -- 2.39.5