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
|
It seems that lightspeed isn't setting the "Required" attribute for not null fields in a mysql 5.x table - SQL Table Script: CREATE TABLE Lightspeed Generated model: using System; using Mindscape.LightSpeed; using Mindscape.LightSpeed.Validation; using Mindscape.LightSpeed.Linq; namespace testmvc.Models
{
[Serializable]
[System.CodeDom.Compiler.GeneratedCode("LightSpeedModelGenerator", "1.0.0.0")]
[System.ComponentModel.DataObject]
[Table("titleslookup", IdColumnName="titleid")]
public partial class TitlesLookup : Entity
} ///
} } Please can you confirm. Thanks |
|
|
This is correct behaviour. If your database column was nullable, the field would be a Because the database column is non-nullable, the field is an Now the So the translation to a non-nullable Obviously, if you do require the non-zero constraint, you can set presence validation manually -- we just don't feel we can infer it from the database schema. |
|