Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java')
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java
index 729ef0cad..ccf97396f 100755
--- a/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java
+++ b/hibernate/org.eclipse.emf.teneo.hibernate/src/org/eclipse/emf/teneo/hibernate/mapping/ExternalType.java
@@ -97,10 +97,15 @@ public class ExternalType implements UserType, ParameterizedType {
String pvalue = null;
if (value != null) {
final Resource res = ((InternalEObject) value).eResource();
- URI uri = res.getURI();
- final String fragment = res.getURIFragment((EObject) value);
- uri = uri.appendFragment(fragment);
- pvalue = uri.toString();
+ // unresolved proxy, just use that
+ if (res == null && ((EObject) value).eIsProxy()) {
+ pvalue = ((InternalEObject) value).eProxyURI().toString();
+ } else {
+ URI uri = res.getURI();
+ final String fragment = res.getURIFragment((EObject) value);
+ uri = uri.appendFragment(fragment);
+ pvalue = uri.toString();
+ }
}
if (pvalue != null) {
statement.setString(index, pvalue);

Back to the top