db4o Developer Community

db4o open source object database, native to Java and .NET
Welcome to db4o Developer Community Sign in | Join
in Search
More Search Options

Replication between Hibernate and db4o

Last post 07-18-2008, 02:16 AM by bhajj. 1 replies.
Sort Posts: Previous Next
  •  06-30-2008, 04:05 PM 49929

    Replication between Hibernate and db4o

    Hi,

    I have implemented a simple class to replicate some objects between db4o and hibernate. I am using Annotations. here is the mapping code:

    @Entity
    @Proxy(lazy = false)

    public class Individual  {


        @Id @GeneratedValue(strategy=GenerationType.AUTO)
        private long Id;
       
        @Basic
        private String name;

    // setter and getters ...

    for the first time is everything OK. I can create an object and replicate it to hibernate. Then I have tried to modify this Object in db4o (reopen ObjectContainer ) and replicate it again to hibernate, but I get this error:

    " identifier of an instance of Individual was altered from 3 to 0 "   and I can not replicate it to hibernate.
     

    it was wondering that I don`t get any errors , if I try to modify the object in hibernate and replicate it to db4o, but the same process from db4o to hibernate, does not work. The hibernate.cfg.xml file is almost the same as in the examples of dRS.

    Thanks 4 any Help. 

     

     

  •  07-18-2008, 02:16 AM 50199 in reply to 49929

    Re: Replication between Hibernate and db4o

    hi nolazem;

    I have, what I am sure will end up to be a stupid question.  I am a newbie to db4o (pretty cool thusfar, I might add!). 

    Why are you wanting to use both db4o and hibernate (to sit on an RDBMS).  Isnt the whole point of db4o to not have to use an RBDMS?

     Sorry for my ignorance.  Best of luck.

     Base

     

View as RSS news feed in XML