Hi,
You are missing a compile call before you can iterate properties.
try adding:
Ah, that is indeed the problem. With that in place, iterate_properties does
very nearly what I need.
The only problem is that I need to get the name of the relation as well. For
now, the following works:
[(a,b)
Hei Wes and Paul...
On 10/29/07, Wes Duff [EMAIL PROTECTED] wrote:
Hey whats going on.
I am a new sqlalchemist as well but lets see if this helps any.
This is how I am getting a list of all names that corrispond with my
document names class.
names = [ c.name for c in
On Oct 30, 2007, at 10:16 AM, Roger Demetrescu wrote:
If we need to introspect both Address-user and User-addresses, one
solution is to not use the backref ... :
use mapper.get_property(name) and mapper.iterate_properties(). I've
considered removing properties as a public accessor
Mike,
use mapper.get_property(name) and mapper.iterate_properties(). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
[Column('id', Integer(), primary_key=True, nullable=False)]
[Column('val',
Hi,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
Ok, I found a hacky way that does what I need:
[(n, getattr(obj, n)) for n in dir(obj)
if isinstance(getattr(obj, n),
Hi,
Ok, I found a hacky way that does what I need:
[(n, getattr(obj, n)) for n in dir(obj)
if isinstance(getattr(obj, n),
sqlalchemy.orm.attributes.InstrumentedAttribute)]
Ooops, not quite what I need. How do I go from a CollectionAttributeImpl to
a mapper?
Paul
On Oct 30, 2007, at 11:25 AM, Paul Johnston wrote:
Mike,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
[Column('id',
On 10/30/07, Paul Johnston [EMAIL PROTECTED] wrote:
Mike,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
Hey whats going on.
I am a new sqlalchemist as well but lets see if this helps any.
This is how I am getting a list of all names that corrispond with my
document names class.
names = [ c.name for c in model.Document.select_by(param=param) ]
So I am just collecting all the names from my Document