-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge fork with enhancements/fixes (#456)
* Add a check to ensure created_at and updated_at are Time If a column is named `created_at` or `updated_at` is not a type `Time?`, then the following occurs: ```There was a problem expanding macro 'macro_4801706624' Code in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} ^ Called macro defined in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} Which expanded to: > 1 | > 2 | if mode == :create > 3 | @created_at = time.at_beginning_of_second ^--------------------- ``` this simply adds a type check. * fix allowing enum columns * ameba fixes * fix build_find_by_clause for bool values * minor update * Fix issue where primary key can be pushed twice on create * fix infinate recusion when searching with enum * add retry to adapter base * add retry to adapters * minor update * add support for querying with Array(UUID) * format docs * FIX: add converter to read_attribute * Fix for type declaration in has_one * Fix callback runs on #import * more has_one fixes; fixes for through associations --------- Co-authored-by: Seth T <crimsonknightstudios@gmail.com>
- Loading branch information
1 parent
51e41d4
commit 5996066
Showing
18 changed files
with
271 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.