Fixed no db when using relation,