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
|
Howdy :) I've ran into a problem using a table that has no properties and just a single auto-generated Id column. Time for some pseudocode! Let's say my table was called Dog. UnitOfWork dc = LightSpeedContext.CreateUnitOfWork(); Dog dog = new Dog(); dc.Add(dog); dc.SaveChanges(); Now I expect dog.Id to be the next autoincremental id, but instead I get the exception: "You are trying to insert an entity with no values and the provider does not support a default values syntax" Yes, mysql doesn't support the default values syntax, but it DOES support this: "insert into dog VALUES()" Which generates and returns the Id correctly. Is there anyway I can do this in lightspeed without having to resort to raw SQL? Thanks, Soen |
|