From fd8a864da0805c5424353b188d4ca665ab4efd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 9 Nov 2023 10:59:05 +0100 Subject: [PATCH] Deprecate `DB.mapping` --- src/db/mapping.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/db/mapping.cr b/src/db/mapping.cr index 8c07499..650ea91 100644 --- a/src/db/mapping.cr +++ b/src/db/mapping.cr @@ -1,5 +1,6 @@ module DB # Empty module used for marking a class as supporting DB:Mapping + @[Deprecated("Use `DB::Serializable` instead")] module Mappable; end # The `DB.mapping` macro defines how an object is built from a `ResultSet`. @@ -57,6 +58,7 @@ module DB # it and initializes this type's instance variables. # # This macro also declares instance variables of the types given in the mapping. + @[Deprecated("Use `DB::Serializable` instead")] macro mapping(properties, strict = true) include ::DB::Mappable @@ -148,6 +150,7 @@ module DB end end + @[Deprecated("Use `DB::Serializable` instead")] macro mapping(**properties) ::DB.mapping({{properties}}) end