annotation Athena::ORM::Annotations::Table
#
Configures the table an entity is stored in.
Without it, the table is named after the entity's class, without its namespace, in snake case; e.g. Blog::BlogPost is stored in blog_post.
@[AORMA::Entity]
@[AORMA::Table(name: "posts")]
class Post < AORM::Entity
# ...
end
The name may also be given as the first positional argument, e.g. @[AORMA::Table("posts")].
Configuration#
Optional Arguments#
name#
Type: String Default: the class name in snake case
The name of the table. Wrap it in backticks if it needs to be quoted, see Quoting Reserved Words.
schema#
Type: String? Default: nil
The name of the schema the table is in.
It may also be given as part of name, e.g. "myschema.posts".