During a save actionDuring a save action an entity's update action failed. The entity which failed is enclosed.

Posts   
 
    
Kris Nobels avatar
Posts: 118
Joined: 02-Apr-2008
# Posted on: 04-Jun-2011 11:15:26   

Hello i have this message when i save my entity.

During a save action an entity's update action failed. The entity which failed is enclosed.

Now this what i do:

1) I work with a MVC Model

2) Get my Entity by ID from the database. I use Automapper to fill up my LLBLgen entity to my Model (http://llblgen.com/TinyForum/Messages.aspx?ThreadID=17504&HighLight=1)

3) Some changes are made in the browser and the user performs a Post to the server.

4) My controler recieves the Model with the changed modeldata.

5) With the ID from my Model i get my Entity from the database. My Entity is a User object. And my UserEntity contains an AdresEntity.

6) I use my Automapper again to map the fields from my Model to my LLBLgen Entity.

7) When i save my Enity i get this message. "During a save action an entity's update action failed. The entity which failed is enclosed."

Note: When i Create my mapping i specify only the fields that are needed.

Can you tell me more how i caused that my Entity is enclosed?

...

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Jun-2011 04:37:31   

Hi Kris,

Would be great if we can see the code that is causing the exception, and the exception stack trace.

Is there any special reason on why you are using Automapper? Have you seen the LLBLGenModelBinder for MVC? Here is a tiny example that demonstrate how to use LLBLGen and MVC: http://llblgen.com/TinyForum/Messages.aspx?ThreadID=19731&StartAtMessage=0&#111280

David Elizondo | LLBLGen Support Team
Kris Nobels avatar
Posts: 118
Joined: 02-Apr-2008
# Posted on: 12-Jun-2011 08:41:01   

Thanks for the info ...

I did not kow that there was LLBLGenModelBinder.

I will try this and i keep you informed.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Jun-2011 20:38:07   

Nice.

I will close this thread for now but you can reopen it at any time.

David Elizondo | LLBLGen Support Team
Kris Nobels avatar
Posts: 118
Joined: 02-Apr-2008
# Posted on: 13-Jun-2011 09:56:27   

Thanks,