0

I have a custom form and wanted to create complex Sitecore items. I am using TDS auto-generated class with GlassMapper.

I am passing Glass object from controller to view, which then serialized to Json object. I am making necessary changes to Json object as per form field values and sending back to controller using POST method.

Everything seems to be working fine. But when i try to post an object which has non default values for GlassBase fields (In edit mode) like ID, Language etc. it's not working even though i have updated each property to public set. I do not wanted to create a ViewModel only for this purpose.

GlassBase

Note: This is working fine with fluent configuration.

2
  • > Note: This is working fine with fluent configuration. Why not just use fluent config then? :)
    – Richard Seal
    Mar 15, 2018 at 15:07
  • We don't want to make that process manual when we add/remove any field from template. Auto generation takes care of it. Mar 15, 2018 at 15:30

1 Answer 1

0

We just ran into an issue with Automapping not working in Glass Mapper version 4.5.0.4 or 4.5.1.339-beta. So if you are using one of those versions it may be a Glass Mapper bug.

1
  • What do you mean by automapping? I am posting json object. Simple to complex type working fine. Issue with GlassBase properties only. Mar 15, 2018 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.