Object conversions

0 views
Skip to first unread message

William Chu

unread,
Aug 12, 2010, 10:41:49 PM8/12/10
to warp...@googlegroups.com, Jason Mirra
Hello,

I have changed the type of a field in an object I persist. For example:

class Foo {

     String someField;
     ....

}

to

class Foo {
   Integer someField;

}

How do I make a conversion from the old objects in the db to the new object structure? I am getting serialization errors when I retrieve or persist the object into the db.


I also know that xstream can do conversions, but I see that warp-persist is using Java's default input/output stream for serialization. Would the solution be to bind the serializer to xstream? If so, how do I do this?

Thanks for the help,
Will

Dhanji R. Prasanna

unread,
Aug 13, 2010, 7:48:44 PM8/13/10
to warp...@googlegroups.com, Jason Mirra
Hi,

What is the persistence layer you are using? You will have to consult the specific provider I'm afraid. Warp-persist does not do any serialization itself. So Hibernate/JPA/db4o is the right person to ask (depending on what you're using).

Dhanji.

--
You received this message because you are subscribed to the Google Groups "warp-core" group.
To post to this group, send email to warp...@googlegroups.com.
To unsubscribe from this group, send email to warp-core+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/warp-core?hl=en.

will

unread,
Aug 13, 2010, 7:58:22 PM8/13/10
to warp-core

We're using JPA. I can't find a JPA community on the web where I can
ask my question. Do you know a forum or community I can ask? Thank you
for the help, Dhanji.

On Aug 13, 4:48 pm, "Dhanji R. Prasanna" <dha...@gmail.com> wrote:
> Hi,
>
> What is the persistence layer you are using? You will have to consult the
> specific provider I'm afraid. Warp-persist does not do any serialization
> itself. So Hibernate/JPA/db4o is the right person to ask (depending on what
> you're using).
>
> Dhanji.
>
> On Fri, Aug 13, 2010 at 12:41 PM, William Chu <will...@gmail.com> wrote:
> > Hello,
>
> > I have changed the type of a field in an object I persist. For example:
>
> > class Foo {
>
> >      String someField;
> >      ....
>
> > }
>
> > to
>
> > class Foo {
> >    Integer someField;
>
> > }
>
> > How do I make a conversion from the old objects in the db to the new object
> > structure? I am getting serialization errors when I retrieve or persist the
> > object into the db.
>
> > I also know that xstream can do conversions, but I see that warp-persist is
> > using Java's default input/output stream for serialization. Would the
> > solution be to bind the serializer to xstream? If so, how do I do this?
>
> > Thanks for the help,
> > Will
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "warp-core" group.
> > To post to this group, send email to warp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > warp-core+...@googlegroups.com<warp-core%2Bunsu...@googlegroups.com>
> > .

Dhanji R. Prasanna

unread,
Aug 13, 2010, 8:06:49 PM8/13/10
to warp...@googlegroups.com
There will typically be a JPA provider (JPA is just a spec). Look in your jar directories to see if it is hibernate or eclipselink or something like that? Then you can track down their forum easily.

Dhanji.

To unsubscribe from this group, send email to warp-core+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages