faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter> <robacarp> I don’t see why not @johansmitsnl, but you’ll have to tweak a few require statements. As long as the files get required you can put them wherever you want
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter> <codenoid> hi all <3
<FromGitter> <Blacksmoke16> o/
<FromGitter> <IrenejMarc> Is there no support for Int8 fields in Granite? The Mysql DB I'm connecting to is full of tinyints.
_whitelogger has joined #amber
feepbot has quit [Ping timeout: 252 seconds]
feepbot has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter> <robacarp> There has been some work done on custom field casting but I’m not sure where that stands these days
_whitelogger has joined #amber
<FromGitter> <drujensen> checking...
<FromGitter> <drujensen> We still have an issue to add custom types. That is a larger change. You could add the logic here: https://github.com/amberframework/granite/blob/master/src/granite/fields.cr#L131
<FromGitter> <drujensen> support other types
<FromGitter> <drujensen> It would be cool to extend the base types and add a duck typed method to perform the cast. That would allow you to add other custom types in the future.
<FromGitter> <drujensen> instead of this large if statement
<FromGitter> <drujensen> I”m not sure if we want to re-open the base types i.e. `Int64` to add the method `cast_to_field` or create custom types for granite i.e. `Granite::Int64.cast_to_field`
_whitelogger has joined #amber
<FromGitter> <drujensen> Released Granite 0.14.0 (https://github.com/amberframework/granite/releases/tag/v0.14.0)
<FromGitter> <drujensen> This has a fairly big breaking change. This remove the pluralized table name using `s`. It fixes the `has_many` relationship and supports custom `foreign_key`
<FromGitter> <drujensen> If you want your table pluralized, you will need to provide the `table_name`
<FromGitter> <drujensen> If you want a pluralized `has_many` name like `has_many posts`, you need to provide the class name. https://github.com/amberframework/granite/blob/master/docs/relationships.md#one-to-many