diff --git a/Project.toml b/Project.toml index 57cc2df..426433e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PostgresORM" uuid = "748b5efa-ed57-4836-b183-a38105a77fdd" authors = ["Vincent Laugier "] -version = "0.6.0" +version = "0.6.1" [deps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" diff --git a/src/Controller/coreORM.update.jl b/src/Controller/coreORM.update.jl index 8d13c13..95a1acd 100644 --- a/src/Controller/coreORM.update.jl +++ b/src/Controller/coreORM.update.jl @@ -310,10 +310,17 @@ function update_entity!(updated_object::IEntity, dbconn) if length(previous_state) == 0 - throw(DomainError("Unable to retrieve an object of type[$data_type] " - * "with id[$(getproperty(updated_object, - orm_module.id_property))] from the database." - *" Remind that only existing existing objects can be updated.")) + + id_for_display = util_get_ids_cols_names_and_values(updated_object, dbconn) |> + dict -> join(["$k: $v" for (k, v) in dict], ", ") + + throw( + DomainError( + "Unable to retrieve an object of type[$data_type] " + *"with id[$id_for_display] " + *"from the database. Remind that only existing objects can be updated." + ) + ) end previous_state = previous_state[1]