From: | glos(at)gmx(dot)net (Gerben) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Serialize subclasses recursively in PostgreSQL db?? |
Date: | 2002-01-10 10:44:16 |
Message-ID: | 7129be4a.0201100244.2eff1032@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
i have the following problem:
I want to store an instance of a class, including it's subclass in a
PostgreSQL database. Does anybody have a sollution for this (see
example beneath)?????
Example:
______________________________________________
Class 1:
--------
public class Test implements java.io.Serializable
{
public String value;
public SubTest b;
public int oid = 0;
public Test()
{
value = "init";
b = new SubTest();
}
public String getValue()
{
return value;
}
}
_________________________________________________
Class 2:
--------
public class SubTest implements java.io.Serializable
{
public String value;
public int oid = 0;
public SubTest()
{
value = "string subtest";
}
public String getValue()
{
return value;
}
}
__________________________________________________
I adjusted Serializa.java that it sees the SubClass, and storing this
one is no problem, BUT storing the oid of Test afterwards is giving me
troubles.
Does anyone know a sollution? Thanxs, you can help me a lot with it.
G.
From | Date | Subject | |
---|---|---|---|
Next Message | Roman Gavrilov | 2002-01-10 10:58:18 | Re: select few fields as a single field |
Previous Message | Holger Krug | 2002-01-10 10:25:31 | Re: select few fields as a single field |