New Posts New Posts RSS Feed: Problem in RejectChanges
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Problem in RejectChanges

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: Problem in RejectChanges
    Posted: 09-Dec-2010 at 2:42pm
This has been fixed and is available in DevForce 6.0.7.
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 25-Oct-2010 at 9:48pm
Hi bala,

I don't know if there is a great workaround.  You can explicitly map the mapping table (many-to-many with payload) and manage the mapping entity manually, but that seems like too much work.

You can also try removing the relationship again after the RejectChanges(), so if you later call SaveChanges(), the record should not be saved.

This should be fixed in our next release (about 6 weeks).

Back to Top
bala View Drop Down
Groupie
Groupie
Avatar

Joined: 18-Aug-2010
Location: Brazil
Posts: 54
Post Options Post Options   Quote bala Quote  Post ReplyReply Direct Link To This Post Posted: 21-Oct-2010 at 9:26am
Hey Ting

I am doing same..
but can you put light how to manage this code for mean while..

Thanks


Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 20-Oct-2010 at 6:47pm
We have confirmed this as a bug.  We'll get it fixed.



Edited by ting - 25-Oct-2010 at 9:36pm
Back to Top
Molinari View Drop Down
Groupie
Groupie
Avatar

Joined: 25-Aug-2010
Posts: 42
Post Options Post Options   Quote Molinari Quote  Post ReplyReply Direct Link To This Post Posted: 20-Oct-2010 at 4:29am
where in the code.
because this command does not exist in many to many...

Need to remove from many to many. Not from the object itself.

Correct me if i wrong.
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 19-Oct-2010 at 5:35pm
Hi bala;

Try using EntityAspect.Delete() method instead.
Back to Top
Molinari View Drop Down
Groupie
Groupie
Avatar

Joined: 25-Aug-2010
Posts: 42
Post Options Post Options   Quote Molinari Quote  Post ReplyReply Direct Link To This Post Posted: 18-Oct-2010 at 3:11am
I having the same problem.
if anyone knows how to solve ...

help ...

Thanks...
Back to Top
bala View Drop Down
Groupie
Groupie
Avatar

Joined: 18-Aug-2010
Location: Brazil
Posts: 54
Post Options Post Options   Quote bala Quote  Post ReplyReply Direct Link To This Post Posted: 14-Oct-2010 at 4:39am

 private void btnRemoverProfissao_Click(object sender, RoutedEventArgs e)
        {
            if (agDataGrid3.SelectedRowsCount != 0)
            {
                PESSOA_PROFISSAO profissao = (PESSOA_PROFISSAO)DataGrid.FocusedDataRow;
                PessoaProfissaoGrupo.PESSOA_PROFISSAO.Remove(profissao);
                Profissoes.Remove(profissao);
            }
            else
                MessageBox.Show("Select a Profession to remove.");
        }

private void CancelButton_Click(object sender, RoutedEventArgs e)

        {
            _em.RejectChanges();
            this.DialogResult = false;
        }

The above code in Child Window I click remove then click on cancel.

(I am not executing _em.saveAsync())

Then I move to other menu and doing other  operation like saving other records

and _em Executing  PessoaProfissaoGrupo.PESSOA_PROFISSAO.Remove(profissao); this records

I expect after i cancel _em should be reject my changes.


Thanks

Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 13-Oct-2010 at 4:46pm
Hi Bala;

Could you give more detail as to how the RejectChanges failed to give result?
Back to Top
bala View Drop Down
Groupie
Groupie
Avatar

Joined: 18-Aug-2010
Location: Brazil
Posts: 54
Post Options Post Options   Quote bala Quote  Post ReplyReply Direct Link To This Post Posted: 13-Oct-2010 at 12:34pm
Hi There
I would come across one problem.
I want to undo my changes So I am using RejectChanges();
Its working with Single table but when I used many to many to relation and
RejectChanges fail to give result.

Any suggestions...


Thanks



Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down