Serialize subclasses recursively in PostgreSQL db??
От | glos@gmx.net (Gerben) |
---|---|
Тема | Serialize subclasses recursively in PostgreSQL db?? |
Дата | |
Msg-id | 7129be4a.0201100244.2eff1032@posting.google.com обсуждение исходный текст |
Список | 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.
В списке pgsql-general по дате отправления: