Browse files

If a database doesn't have collection, need to create a test collecti…

…on in order to click to create new collections.
  • Loading branch information...
1 parent 1f1c33d commit a82839be3cca2421cebdafa0d899ac46a096d8fb @bububa committed Jun 14, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 ConnectionWindowController.mm
View
3 ConnectionWindowController.mm
@@ -268,6 +268,9 @@ - (void)useDB:(id)sender {
[collections release];
[loaderIndicator start];
collections = [[NSMutableArray alloc] initWithArray:[mongoDB listCollections:dbname user:user password:password]];
+ if ([collections count] == 0) {
+ [collections addObject:@"test"];
+ }
[loaderIndicator stop];
[dbname release];

0 comments on commit a82839b

Please sign in to comment.