New Posts New Posts RSS Feed: Error in custom .Create() method
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error in custom .Create() method

 Post Reply Post Reply
Author
sherpedro View Drop Down
Newbie
Newbie
Avatar

Joined: 02-Feb-2008
Location: Canada
Posts: 2
Post Options Post Options   Quote sherpedro Quote  Post ReplyReply Direct Link To This Post Topic: Error in custom .Create() method
    Posted: 04-Oct-2010 at 10:41am
ok finally i found the problem...
i was using an entity from a particular entitymanager as an  argument to .Create() method of an entity from a different entitymanager. I was connected through an EntityServer_XXX, so the error returned was not precise enough to find out about the problem. Switch back to local mode for debugging and then the error became more precise.
Back to Top
sherpedro View Drop Down
Newbie
Newbie
Avatar

Joined: 02-Feb-2008
Location: Canada
Posts: 2
Post Options Post Options   Quote sherpedro Quote  Post ReplyReply Direct Link To This Post Posted: 01-Oct-2010 at 11:43am
Hi, i have problems with new entity creation process through .Create() method.
 
Here is the stack trace error i received on the .AddToManager line of code
 
   at IdeaBlade.EntityModel.EntityManager.CheckForPkIdentityProperty(EntityWrapper wrapper)
   at IdeaBlade.EntityModel.EntityManager.AddEntity(Object entity)
   at IdeaBlade.EntityModel.EntityAspect.AddToManager()
   at Qualicode.MayaModel.T_Maya_UserSetting.Create(EntityManager manager, String pBaseRootNameSpace, T_Maya_User poUser) in C:\RepertoireDeTravail\MAYA\Qualicode.DomainModel\T_Maya_UserSetting.cs:line 38
   at Qualicode.Business.WinClient.Model.MayaPortalModel.GetNewUserSetting(T_Maya_User poOwnerUser, String pBaseRootNameSpace) in C:\RepertoireDeTravail\MAYA\Qualicode.Business.WinClient\Model\MayaPortalModel.cs:line 133
   at Qualicode.Business.WinClient.Presenter.MayaEngine.UserSettingManager_NewUserSettingsNeeded(Object sender, NewUserSettingsEventArgs e) in C:\RepertoireDeTravail\MAYA\Qualicode.Business.WinClient\Presenter\MayaEngine.cs:line 1961
   at Qualicode.Core.UserSettingManager.Key(String pNameSpace) in C:\RepertoireDeTravail\MAYA\Qualicode.Core\UserSettingManager.cs:line 82
   at Qualicode.Business.WinClient.View.frmMain.SaveUserSettings(UserSettingManager& poUserSettingManager) in C:\RepertoireDeTravail\MAYA\Qualicode.Business.WinClient\View\frmMain.cs:line 333
   at Qualicode.Business.WinClient.Presenter.MayaEngine._MainForm_FormClosing(Object poSender, FormClosingEventArgs poEventArgs) in C:\RepertoireDeTravail\MAYA\Qualicode.Business.WinClient\Presenter\MayaEngine.cs:line 1932
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
 
 
I see that the error is raise on the IdeaBlade.EntityModel.EntityManager.CheckForPkIdentityProperty call.
The error i received is "Object reference not set to an instance of an object."
 
Everything was working fine couple of days ago, but now we just can't add new entities. Fetching and updating existing data actually works fine!
 
We're working on a n-tiers architecture with multiple Domain models (different DataSourceKeyName) each with multiple KeyExtensions (allowing lan or wan acces to data).
 
Any help would be great. Thanks.
Pierre
 


Edited by sherpedro - 05-Oct-2010 at 10:38am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down