I define some objects that work fine; for metaprograms. Now I need to reflect the field properties defined in the model.
For example:
class Foo(Entity): bar = OneToMany('Bar') baz = ManyToMany('Baz')
What type of relationship is specified: "ManyToMany", "OneToMany" or even a simple "Field" and the purpose of the relationship?
Is there an easy way to reflect elixir objects?
Elixir, Python, - class Foo dir(Foo), getattr(Foo, thename), type(theattr) isinstance .. 'Bar', Relationship ( OneToMany ManyToMany), r.of_kind r "".
class Foo
dir(Foo)
getattr(Foo, thename)
type(theattr)
isinstance
'Bar'
Relationship
OneToMany
ManyToMany
r.of_kind
inspect Python , dir/getattr/isinstance & c .
inspect
Source: https://habr.com/ru/post/1707152/More articles:SQL server writes a column once - sql-serverhow to run php file by double clicking any folder such as html files in windows xp? - phppyinotify error with read file when creating? - pythonStatistical Estimation Algorithm - mathЕсть ли приличная С++-оболочка вокруг Win32 lockless SList? - c++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707153/is-it-good-practice-to-force-users-to-update-their-browser&usg=ALkJrhgjjnCrkearfTWCQf-rmsZdEldiYgHow to switch row / column in Excel chart using C #? - c #Trying to get a simple asp.net ajax dropdownlist autocomplete extender example to work! - c #How to make Flash PreLoader only in AS3? - flexKeep in touch with php? - performanceAll Articles