fix a bug in model insert when data is empty
add log_sql in config
add relation in model