An error occurred while updating the entries. See the inner exception for details. - Asps.net MVC 3
i am having this exception coming everytime i run and try to create the post..

i am having a simple User,Post,Comment,Tag entity. which has relationship association defined by me. when i am checking the innerException it says "Cannot insert the value NULL into column 'CommentID', table " ... and its pointing to my context where i have a relationship defined..please check my relationship and help me finding this where i have delclared that null is not allowed in Comment ID...

1) 1 user can have many posts, can create many tags, can have many comments
2) 1 post can have 1 user, many comments, and can have many tags
 3) 1 tag can have 1 user, many post
4) 1 comment can have 1 user, 1 post

RelationShip...
=====================

    modelBuilder.Entity<User>().HasMany(p => p.Posts).WithRequired(u => u.Users).HasForeignKey(P=>P.UserID);
                modelBuilder.Entity<User>().HasMany(t => t.Tags).WithRequired(u => u.Users);
                modelBuilder.Entity<User>().HasMany(c => c.Comments).WithRequired(u => u.Users);
    
                modelBuilder.Entity<Post>().HasRequired(u => u.Users).WithMany(p=>p.Posts);
                modelBuilder.Entity<Post>().HasMany(t => t.Tags).WithMany(p => p.Posts);
                modelBuilder.Entity<Post>().HasOptional(c => c.Comments);
                
    
                modelBuilder.Entity<Comment>().HasRequired(u => u.Users);
                modelBuilder.Entity<Comment>().HasRequired(p => p.Posts);
    
                modelBuilder.Entity<Tag>().HasRequired(u => u.Users);
                modelBuilder.Entity<Tag>().HasMany(p => p.Posts).WithMany(t => t.Tags);
An error occurred while updating the entries. See the inner exception for details. - Asps.net MVC 3
===

i am having this exception coming everytime i run and try to create the post..

i am having a simple User,Post,Comment,Tag entity. which has relationship association defined by me. when i am checking the innerException it says "Cannot insert the value NULL into column 'CommentID', table " ... and its pointing to my context where i have a relationship defined..please check my relationship and help me finding this where i have delclared that null is not allowed in Comment ID...

1) 1 user can have many posts, can create many tags, can have many comments
2) 1 post can have 1 user, many comments, and can have many tags
 3) 1 tag can have 1 user, many post
4) 1 comment can have 1 user, 1 post

RelationShip...
=====================

    modelBuilder.Entity<User>().HasMany(p => p.Posts).WithRequired(u => u.Users).HasForeignKey(P=>P.UserID);
                modelBuilder.Entity<User>().HasMany(t => t.Tags).WithRequired(u => u.Users);
                modelBuilder.Entity<User>().HasMany(c => c.Comments).WithRequired(u => u.Users);
    
                modelBuilder.Entity<Post>().HasRequired(u => u.Users).WithMany(p=>p.Posts);
                modelBuilder.Entity<Post>().HasMany(t => t.Tags).WithMany(p => p.Posts);
                modelBuilder.Entity<Post>().HasOptional(c => c.Comments);
                
    
                modelBuilder.Entity<Comment>().HasRequired(u => u.Users);
                modelBuilder.Entity<Comment>().HasRequired(p => p.Posts);
    
                modelBuilder.Entity<Tag>().HasRequired(u => u.Users);
                modelBuilder.Entity<Tag>().HasMany(p => p.Posts).WithMany(t => t.Tags);