New Posts New Posts RSS Feed: Intended behaviour?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Intended behaviour?

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

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: Intended behaviour?
    Posted: 19-Oct-2010 at 6:13pm

Version 6.0.6 is now available.

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 19-Oct-2010 at 5:37pm
We did fix the problem in 6.0.6, so you won't have to wait long.  We'll post when 6.0.6 is up on the web site, but it should be real soon now.
Back to Top
jsobell View Drop Down
Groupie
Groupie
Avatar

Joined: 02-Apr-2009
Location: Australia
Posts: 80
Post Options Post Options   Quote jsobell Quote  Post ReplyReply Direct Link To This Post Posted: 19-Oct-2010 at 3:46pm
Two very recent postings here and here also discuss the issue, but it's not going to be fixed until 6.0.7, so we'll have to wait.
Back to Top
cjohnson84 View Drop Down
Groupie
Groupie


Joined: 24-Sep-2009
Location: Akron, Ohio
Posts: 44
Post Options Post Options   Quote cjohnson84 Quote  Post ReplyReply Direct Link To This Post Posted: 19-Oct-2010 at 8:32am
Was this issue ever resolved?  I am now running into the "Null or pending entities cannot be modified" error.  In my particular case I have bound an Employee entity to my UI.  The Employee entity may or may not have a related Demographic entity.  If the Employee entity does not have a related Demographic entity when I examine the contents of my EntityManager I see a "detached" Demographic entity related to the Employee entity.  If I try to set a field in my UI (GenderID) that is in the Demographic entity I get the error.
 
Here is my stack trace:
 
   at IdeaBlade.EntityModel.EntityGroup.OnEntityPropertyChanging(EntityPropertyChangingEventArgs e)
   at IdeaBlade.EntityModel.EntityWrapper.SetValueWithChangeNotification(DataEntityProperty property, Object newValue)
   at IdeaBlade.EntityModel.EntityWrapper.IdeaBlade.EntityModel.IStructuralObject.SetValueWithChangeNotification(DataEntityProperty property, Object newValue)
   at IdeaBlade.EntityModel.DataEntityProperty`2.SetValueWithVerification(TInstance instance, TValue newValue)
   at IdeaBlade.EntityModel.DataEntityProperty`2.<.ctor>b__4(DataEntityPropertySetInterceptorArgs`2 args)
   at IdeaBlade.Core.PropertyInterceptor`3.HandleAction(Action`1 action, TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.<>c__DisplayClassb.<BuildTargetedCombinedAction>b__5(TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.ExecuteActions(TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.SetValue(TInstance instance, Object context, TValue value)
   at IdeaBlade.Core.PropertyInterceptor`3.SetValue(TInstance instance, TValue value)
   at IdeaBlade.EntityModel.DataEntityProperty`2.SetValue(TInstance instance, TValue value)
   at OrianaHouse.CMIS.Data.DataModel.Demographic.set_GenderID(Byte value)
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: 16-Sep-2010 at 6:40pm
Yes, we've seen the same artifiacts in binding where it is calling the 'set' even though it is only displaying and not modifying the value.  I know you've been chatting with Ward - you might want to bounce this one off him.
Back to Top
jsobell View Drop Down
Groupie
Groupie
Avatar

Joined: 02-Apr-2009
Location: Australia
Posts: 80
Post Options Post Options   Quote jsobell Quote  Post ReplyReply Direct Link To This Post Posted: 15-Sep-2010 at 11:57pm
Sorry, should have posted the following exception text too.

IdeaBlade.Core.IdeaBladeException occurred
  Message=Null or pending entities cannot be modified
  StackTrace:
       at IdeaBlade.EntityModel.EntityGroup.OnEntityPropertyChanging(EntityPropertyChangingEventArgs e)
       at IdeaBlade.EntityModel.EntityWrapper.SetValueWithChangeNotification(DataEntityProperty property, Object newValue)
       at IdeaBlade.EntityModel.EntityWrapper.SetValue(DataEntityProperty targetProperty, EntityWrapper sourceEntity, DataEntityProperty sourceProperty)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.UpdateOtherProperties(EntityRelationLink relationLink, EntityWrapper fromEntity, EntityWrapper toEntity)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.UpdateFkForNewToEntity(EntityWrapper toEntity)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.SetEntity(T newValue, Boolean updateFkValues, Boolean updateInverseValues)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.CreateOrFindPendingEntity(EntityReferenceStrategy strategy)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.QueryForEntity(EntityReferenceStrategy strategy)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.GetEntity(EntityReferenceStrategy strategy)
       at IdeaBlade.EntityModel.ScalarEntityReference`1.GetValue()
       at IdeaBlade.EntityModel.NavigationScalarEntityProperty`2.<.ctor>b__0(NavigationEntityPropertyGetInterceptorArgs`2 args)
       at IdeaBlade.Core.PropertyInterceptor`3.HandleAction(Action`1 action, TArgs args)
       at IdeaBlade.Core.PropertyInterceptor`3.<BuildTargetedCombinedAction>b__3(TArgs args)
       at IdeaBlade.Core.PropertyInterceptor`3.ExecuteActions(TArgs args)
       at IdeaBlade.Core.PropertyInterceptor`3.GetValue(TInstance instance, Object context)
       at IdeaBlade.Core.PropertyInterceptor`3.GetValue(TInstance instance)
       at IdeaBlade.EntityModel.NavigationScalarEntityProperty`2.GetValue(TInstance instance)
       at RiskStructureEditor.Web.Node.get_NodeTarget()
  InnerException:

Back to Top
jsobell View Drop Down
Groupie
Groupie
Avatar

Joined: 02-Apr-2009
Location: Australia
Posts: 80
Post Options Post Options   Quote jsobell Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2010 at 9:38pm
Interestingly, calling the Get on this property in code does not generate this exception, but any binding to it does, and yet according to VS2010 the Set method is never called.
What circumstances might cause this exception to be thrown via the Get method? Why is databinding so damned difficult to debug in VS?
Back to Top
jsobell View Drop Down
Groupie
Groupie
Avatar

Joined: 02-Apr-2009
Location: Australia
Posts: 80
Post Options Post Options   Quote jsobell Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2010 at 9:24pm
Just struck an intersting error message in a moderately simple binding situation:

I have a selected node from a tree that has an optional 'Target' entity as a property.
Targets may or may not exist for a node, and the display switches between showing the target data and hiding it through a behaviour.
Given that the visibility is programmatic, the bindings are obviously always there (but the text boxes hide and display), so the XAML for the enclosed textbox is:

Text="{Binding SelectedNode.NodeTarget.TARGET, Mode=TwoWay}"

When the code runs, we get the error
"Null or pending entities cannot be modified"
from the Get of the
   public NodeTarget NodeTarget {
      get { return PropertyMetadata.NodeTarget.GetValue(this); }
<==== Here
      set { PropertyMetadata.NodeTarget.SetValue(this, value); }
    }

In this case 'this' is set to a valid entity, and this.NodeTarget is reported as '{NodeTarget:0} - Detached entity'

Setting Mode=OneWay has the same problem, so is this really intended behaviour? Why is a call to fetch a property from a non-initialised entity raising this particular exception?
I understand that it doesn't make sense to read a property from what is effectively a NULL reference, but this is one of the issues with XAML binding.

Any suggestions?

Cheers,
 Jason
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down