Skip to content

Instantly share code, notes, and snippets.

@robi42
Created April 6, 2010 22:39
Show Gist options
  • Save robi42/358213 to your computer and use it in GitHub Desktop.
Save robi42/358213 to your computer and use it in GitHub Desktop.
Index: src/org/ringojs/wrappers/Storable.java
===================================================================
--- src/org/ringojs/wrappers/Storable.java (revision 283dfdd4c41ea6b9e7965f6abe01cad6e9842a65)
+++ src/org/ringojs/wrappers/Storable.java Wed Apr 07 00:37:58 CEST 2010
@@ -16,7 +16,7 @@
private Object key;
private Object entity;
- enum FactoryType {CONSTRUCTOR, FACTORY};
+ enum FactoryType {CONSTRUCTOR, FACTORY}
public Storable() {
this.isPrototype = true;
@@ -138,7 +138,7 @@
key = invokeStoreMethod("getKey", type, entity);
}
if (transaction == Undefined.instance) {
- invokeStoreMethod("remove", key);
+ invokeStoreMethod("remove", key, type);
} else {
invokeStoreMethod("remove", key, transaction);
}
@hns
Copy link

hns commented Apr 7, 2010

Is this needed for hibernate support? I'm not quite sure i like it that the third argument can be either a transaction or a type string.

Is it possible to retrieve the type name from, say, this.constructor.name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment