added model detection by table name with prefix support
fixed relation detection
updated UI