Skip to content

Commit

Permalink
fixing all ERRestTests but one
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Feb 23, 2017
1 parent af4a73a commit 6672c5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/ERRestTest/Sources/er/rest/ERRestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import er.rest.model.Company;
import er.rest.model.Manufacturer;
import er.rest.model.Person;
import er.rest.utils.ERXEONoIdRestDelegate;

public class ERRestTest extends TestCase {
private EOObjectStoreCoordinator _osc;
Expand All @@ -47,6 +48,9 @@ public void setUp() {
System.setProperty("NSPropertiesInitializationWarning", "false");
NSBundle.mainBundle();

// register special that excludes the id attribute for EOs
IERXRestDelegate.Factory.setDefaultDelegate(new ERXEONoIdRestDelegate());

EOObjectStoreCoordinator osc = new EOObjectStoreCoordinator();
// EOEditingContext editingContext = ERXEC.newEditingContext(osc);
// editingContext.lock();
Expand Down
11 changes: 11 additions & 0 deletions Tests/ERRestTest/Sources/er/rest/utils/ERXEONoIdRestDelegate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package er.rest.utils;

import er.rest.ERXEORestDelegate;
import er.rest.ERXRestContext;

public class ERXEONoIdRestDelegate extends ERXEORestDelegate {
@Override
public Object primaryKeyForObject(Object obj, ERXRestContext context) {
return null;
}
}

0 comments on commit 6672c5f

Please sign in to comment.