This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi All, What was working, seems to no longer be. I have multiple tables in MySQL 5, InnoDB, FK's linking member id's around, etc. All the tables have an 'Id' col thats auto inc, and this worked great for awhile now. using (DBUnitOfWork DB = new LightSpeedContext<DBUnitOfWork>("default").CreateUnitOfWork()) DB.Add(mem); DB.SaveChanges(); } This use to work perfectly without error, and now I'm getting The object [Member [Id=-1, EntityState=New]] could not be saved because it is invalid. The errors are: Address is required Thinking this might be because the col's werent allowing nulls, I switched the columns, updated my model within the designer, and I still keep getting the above or very similar. Am I missing something very silly here? I'm still pretty new to Lightspeed, but since I purchased it, its been all smooth sailing until now. Like I said, this use to work perfectly, I cant recall if I updated to a Nightly build or not since it last worked. Just to double check that though, I removed the current LightSpeed, and installed the June 19th nightly build, but I still get the above. Ideally, I want to be using MySQL's own Insert ID's on the tables.
Any pointers / etc, Thank you in advance. |
|
|
Incase anyone happens to stumble across this, it turns out that there was an underlying MySQL error occuring that I was unable to see. Corrected the issue in the schema and all appears to be well again. |
|