I'm trying to create a simple Lightswitch application that contains one table ("Transaction" entity) and one view ("Invoice" entity). In this case, the Invoices view is generated from the Transactions table by grouping on Transactions.InvoiceId. The view then references the table through a one-to-many relationship such that Invoice shows up as a navigation property on Transaction, and Transactions shows up as a navigation property on Invoice. Everything works 100% perfectly until I try to create a new Transaction and save it, at which time a validation rule within Lightswitch fires saying "Invoice: The referenced Invoice is either not set or no longer exists." It's correct that the invoice doesn't exist--the Transaction I'm trying to save will be the first one of the new Invoice.
Currently I'm circumventing this problem by handling the Saving event and manually creating the Transaction in my own DataWorkspace, but that feels like a hack and doesn't allow me to use Lightswitch's built-in validation against the other fields in my Transaction entity.
Is there any way I can either tell Lightswitch to skip validation on the Invoice navigation property but leave the others intact? Or are there any other ways I can accomplish what I'm trying to do?