We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In some cases it would be useful to define metadata for options while initializing.
For example we can use SmartInitializer for describing relational database tables:
SmartInitializer
class Model include SmartCore::Initializer def self.column(...) option(...) end end class Author < Model column :id, Types::Integer, metadata: { primary_key: true } column :name, Types::String, metadata: { unique: true } end class Book < Model column :author, Types::Integer, metadata: { foreign_key: Author } column :title, Types::String end class CoveredBook < Book column :cover, Types::Base64Image end
In that case some static metadata that can be inherited would be very useful.
The text was updated successfully, but these errors were encountered:
And some way to read:
Author.__options__.first.metadata # => { primary_key: true }
Sorry, something went wrong.
No branches or pull requests
In some cases it would be useful to define metadata for options while initializing.
For example we can use
SmartInitializer
for describing relational database tables:In that case some static metadata that can be inherited would be very useful.
The text was updated successfully, but these errors were encountered: