Open GoogleCodeExporter opened 9 years ago
To follow up: Entity Tracking and Entity Factory settings do not appear to be
related to this issue.
Original comment by rhet...@gmail.com
on 20 Jun 2008 at 11:18
It seems the issue is occuring when trying to save a new parent and child at
the
same time. If I load an existing parent and child then modify them I can
DeepSave
without an issue.
Original comment by rhet...@gmail.com
on 20 Jun 2008 at 11:43
This happened to me too, and the issue does begin on:
CCMS.Entities.ParentBase.AcceptChanges().
To put it simple, AcceptChanges is broken when the related object is loaded on
the
entity. To do a simple save (not deep), I had to null the property, save and
then
set the property again. Also note that entity tracking does affect this, as a
simple
get can come with the related object's property filled, and from then on you
can't
do a simple get (not deep).
Original comment by freddyri...@gmail.com
on 2 Jul 2008 at 8:05
More information can be found at the following forum thread
(http://community.codesmithtools.com/forums/p/8276/30939.aspx#30939)
What version of .netTiers and CodeSmith are you using?
2.2
duplicate issue (http://code.google.com/p/nettiers/issues/detail?id=17)
Original comment by bniemyjski
on 8 Dec 2008 at 5:49
Original comment by bniemyjski
on 25 May 2009 at 3:30
problem seems to still exist in .netTiers 2.3
Original comment by stafford...@gmail.com
on 20 Jul 2009 at 11:45
Hi - stumbled across this issue today and my obvious thought was: Well if the
entity
already exists in the IDictionary, don't bother adding it again as it's already
been
processed.
I put this after the if(existingCopies == null) statement at the beginning of
Copy(IDictionary existingCopies) in EntityInstanceBase.generated.cst:
else if (existingCopies.Contains(this))
{
return (<%=className%>)existingCopies[this];
}
Works fine for me although maybe I'm potentially creating another bug? I don't
know,
but like I say it works ok for me for now, will update if I get any problems.
Original comment by teppic.x...@gmail.com
on 17 Sep 2009 at 2:50
Hi - I have .netTiers 2.3.1. The problem still shows up while doing a copy.
I get this error:
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at MyProject.Entities.MyTableBase.Copy(IDictionary existingCopies)
..
..
Please help.
Original comment by kissinge...@gmail.com
on 8 Feb 2011 at 5:35
I tried to update my current EntityProviderBaseCore.cst template with the patch
provided here ->
http://community.codesmithtools.com/nettiers/f/30/p/5668/24286.aspx#24286
I am unable to find that spot to put those changes in this patch. Does this
patch really work at all?
Please help.
Original comment by kissinge...@gmail.com
on 8 Feb 2011 at 7:46
Please help with comment 8 or comment 9 posted by me.
Also as mentioned in comment 7 by user 'teppic.x..', does it break anything or
cause any problems if i go with that approach (in other words, use that elseif
condition to check if the collection already exists).
Original comment by kissinge...@gmail.com
on 8 Feb 2011 at 8:07
Hello,
Does your scenario match the one defined above? If not how are you reproducing
this issue. That patch is from 2007 and would need to be applied and updated to
the current version.
I haven't reviewed this ticket before and would need to take a look at a sample
to get up-to-speed.
Have you made the change discussed in comment 7? Did it resolved the issue? If
it already exists in the collection than one would think it would be safe to
apply the code in #7. But this is just an hypothesis with no debugging or time
looking at this issue.
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 9 Feb 2011 at 7:38
Hi,
I have not applied the code in #7 yet. I was concerned about breaking any
existing code.
Since you recommend applying it, i will go ahead and apply it.
Will notify if i run into any problems.
Also, I wanted to share my problem scenario any way. Here's the situation:
I got a MyTransaction table that has a foreign key relationship with another
table called MyLineItems. Hence when i save a MyTrans object having say 20-30
count of MyLineItemsCollection, then I get this error after saving
MyTransaction in the database. (ApplyChanges() method called). At this point it
still need to save MyLineItems collection in to the database. It errors out
with the below message.
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at MyProject.Entities.MyTableBase.Copy(IDictionary existingCopies)
Thanks a lot.
Original comment by prachama...@gmail.com
on 9 Feb 2011 at 9:16
Hello,
Thanks a lot for that information. If you could apply that work around and keep
us updated of the status of this issue in say a week that would be greatly
appreciated!
Thanks
-Blake
Original comment by bniemyjski
on 9 Feb 2011 at 10:16
Hi ,
As of now, I didn't notice any issues pertaining to this change. Will keep you
posted. Thanks.
Original comment by prachama...@gmail.com
on 15 Feb 2011 at 11:10
Hello,
Thanks for the update.
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 16 Feb 2011 at 4:45
Original issue reported on code.google.com by
rhet...@gmail.com
on 20 Jun 2008 at 4:02