payload: {"action":"created","issue":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/4332","repository_url":"https://api.github.com/repos/volkanceylan/Serenity","labels_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/4332/labels{/name}","comments_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/4332/comments","events_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/4332/events","html_url":"https://github.com/volkanceylan/Serenity/issues/4332","id":420778006,"node_id":"MDU6SXNzdWU0MjA3NzgwMDY=","number":4332,"title":"MasterDetail; Saving of detail row while creating a new Master record tries to directly save to Detail table (not to in-memory)","user":{"login":"JohnRanger","id":2699447,"node_id":"MDQ6VXNlcjI2OTk0NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/2699447?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnRanger","html_url":"https://github.com/JohnRanger","followers_url":"https://api.github.com/users/JohnRanger/followers","following_url":"https://api.github.com/users/JohnRanger/following{/other_user}","gists_url":"https://api.github.com/users/JohnRanger/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnRanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnRanger/subscriptions","organizations_url":"https://api.github.com/users/JohnRanger/orgs","repos_url":"https://api.github.com/users/JohnRanger/repos","events_url":"https://api.github.com/users/JohnRanger/events{/privacy}","received_events_url":"https://api.github.com/users/JohnRanger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-14T00:22:44Z","updated_at":"2019-03-14T06:34:10Z","closed_at":"2019-03-14T06:34:10Z","author_association":"NONE","body":"Hi all,\r\n\r\nI am trying (for the first time - and now for quite some time) to do a master-detail with Serenity, \r\n\r\nFollowing basically the Serenity Guide over here: https://serenity.is/Docs/tutorials/movies/the_cast_and_characters_they_played - but with my own Serenity-based app.\r\n\r\nI am struggling to pass over the step \"Now try adding an actor/actress, for example, Keanu Reeves / Neo:\"\r\n\r\nWhen I am trying to add a detail row within a new (not yet saved) master dialog/record, there is always a SQL error from the detailRepository.cs because the detail record is being directly saved to the corresponding detail table and because the master record ID is not yet known - but instead it should go to the in-memory DetailList field. (if I fill the detailList programmatically from within the master dialog, this works fine).\r\n\r\nI have defined The MasterDetailRelation tag on the corresponding DetailList field within the masterRow.cs like this:\r\n\r\n```cs\r\n#region DetailList\r\n        [DisplayName(\"Details\"), MasterDetailRelation(foreignKey: \"RessortLayoutTransformationId\"), NotMapped]\r\n        public List<RessortLayoutTransformationDetailsRow> DetailList { get { return Fields.DetailList[this]; }  set { Fields.DetailList[this] = value; } }\r\n        public partial class RowFields { public RowListField<RessortLayoutTransformationDetailsRow> DetailList; }\r\n#endregion DetailList\r\n```\r\n\r\n(RessortLayoutTransformationId is the linking field between Master and the detail rows).\r\n\r\nIn addition, I tried to reverse-engineer the Northwind Order/orderDetail - but so far with no success.\r\n\r\nAlso I have observed that within the xyzEditor.ts, the validateEntity method is not triggered when the \"save\" button within the Detail Dialog is pressed. I have verified that the xyzEditor.ts is used as the constructor gets called when clicking on the \"add\" button for a detail within the master dialog.\r\n\r\nMy xyzEditor.ts looks like this:\r\n```ts\r\n/// <reference path=\"../../Common/Helpers/GridEditorBase.ts\" />\r\n\r\nnamespace RALayoutManager2.Ressorts {\r\n\r\n    @Serenity.Decorators.registerEditor()\r\n    export class LayoutTransformationDetailsEditor extends Common.GridEditorBase<RessortLayoutTransformationDetailsRow> {\r\n        protected getColumnsKey() { return \"Ressorts.RessortLayoutTransformationDetails\"; }\r\n        protected getDialogType() { return RessortLayoutTransformationDetailsDialog; }\r\n        protected getLocalTextPrefix() { return RessortLayoutTransformationDetailsRow.localTextPrefix; }\r\n\r\n        constructor(container: JQuery) {\r\n            super(container);\r\n\r\n        }\r\n\r\n        protected getAddButtonCaption() {\r\n            return \"Add\";\r\n        }\r\n\r\n        protected validateEntity(row: RessortLayoutTransformationDetailsRow, id: number) {\r\n\r\n            alert(\"jojo\");\r\n            if (!super.validateEntity(row, id))\r\n                return false;\r\n\r\n            row.TacMasterLayoutTransformationDetailFieldKey = RALayoutManager2.TACMasterLayouts.TacMasterLayoutTransformationDetailsRow.getLookup()\r\n                .itemById[row.TacMasterLayoutTransformationDetailId].TacMasterLayoutTransformationDetailFieldKey;\r\n\r\n            row.TacMasterLayoutTransformationDetailFieldName = RALayoutManager2.TACMasterLayouts.TacMasterLayoutTransformationDetailsRow.getLookup()\r\n                .itemById[row.TacMasterLayoutTransformationDetailId].TacMasterLayoutTransformationDetailFieldName;\r\n\r\n            return true;\r\n        }  \r\n        \r\n    }\r\n}\r\n```\r\n\r\nAlso I have tried to remove any reference within the detailRow.cs to the underlying SQL table (removed the : base(\"[dbo].[tDetailTblename]\")) - but somehow it still finds it (didn't figure out how it can do this).\r\n\r\n--------------\r\n\r\nAfter removing create, update and delete handlers frim detailRepository.cs and detailEndpoint.cs, I now get the following error (logically):\r\n\r\nIt cannot find the ressource under the following url: /services/Ressorts/RessortLayoutTransformationDetails/Create\r\n\r\n\r\n--------------\r\n\r\nAny hint to where I could look to how to switch storing any detail rows only in-memory and not to the detail table itself when pressing the save button on the detail dialog?\r\n\r\nI must miss some important detail somewhere - but I simply cannot get it.\r\n\r\nThanks for any help.\r\n\r\nWith kind regards,\r\n\r\nJohn"},"comment":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/comments/472722104","html_url":"https://github.com/volkanceylan/Serenity/issues/4332#issuecomment-472722104","issue_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/4332","id":472722104,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MjcyMjEwNA==","user":{"login":"JohnRanger","id":2699447,"node_id":"MDQ6VXNlcjI2OTk0NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/2699447?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnRanger","html_url":"https://github.com/JohnRanger","followers_url":"https://api.github.com/users/JohnRanger/followers","following_url":"https://api.github.com/users/JohnRanger/following{/other_user}","gists_url":"https://api.github.com/users/JohnRanger/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnRanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnRanger/subscriptions","organizations_url":"https://api.github.com/users/JohnRanger/orgs","repos_url":"https://api.github.com/users/JohnRanger/repos","events_url":"https://api.github.com/users/JohnRanger/events{/privacy}","received_events_url":"https://api.github.com/users/JohnRanger/received_events","type":"User","site_admin":false},"created_at":"2019-03-14T06:34:10Z","updated_at":"2019-03-14T06:34:10Z","author_association":"NONE","body":"Hi all,\r\n\r\nI have found the issue. Because I had generated the detailDialog.ts with Sergen, the dialog type was:\r\n\r\n```ts\r\nSerenity.EntityDialog<RessortLayoutTransformationDetailsRow, any>\r\n```\r\n\r\ninstead of:\r\n\r\n```ts\r\nCommon.GridEditorDialog<RessortLayoutTransformationDetailsRow>\r\n```\r\n\r\nHope, this helps somebody.\r\n\r\nWith kind regards,\r\n\r\nJohn"}}
other: {"actor":{"display_login":"JohnRanger"}}