You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Nishant Neeraj <nn...@yahoo.com> on 2010/02/17 09:49:49 UTC
Registering Objects
Hi,
I am using Cayenne 3.0B1. I have couple of what-ifs
1. If I try to register an already registered DataObject, will it create duplication?
2. If I create a new object Using DataContext.newObject(..), and then don't modify the newly created object. Will it create a new DB entry on commitChanges()?
I am hoping the answers to both would be no.
Regards,
Nishant
Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
Re: Registering Objects
Posted by Andrey Razumovsky <ra...@gmail.com>.
No and yes. You'll need to unregister manually
2010/2/17 Nishant Neeraj <nn...@yahoo.com>
> Hi,
>
> I am using Cayenne 3.0B1. I have couple of what-ifs
>
> 1. If I try to register an already registered DataObject, will it create
> duplication?
> 2. If I create a new object Using DataContext.newObject(..), and then don't
> modify the newly created object. Will it create a new DB entry on
> commitChanges()?
>
> I am hoping the answers to both would be no.
>
> Regards,
> Nishant
>
>
>
> Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!
> http://downloads.yahoo.com/in/internetexplorer/
--
Andrey
Re: Registering Objects
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Feb 17, 2010, at 10:49 AM, Nishant Neeraj wrote:
> 1. If I try to register an already registered DataObject, will it
> create duplication?
No, DataContext handles this case correctly.
> 2. If I create a new object Using DataContext.newObject(..), and
> then don't modify the newly created object. Will it create a new DB
> entry on commitChanges()?
Yes. The object will be committed.
Andrus