[sqlalchemy] Re: Reflection including Relations

2007-02-16 Thread shday

Foreign key relations *are* reflected. That information is used when
you set-up 'properties'. Notice that you don't have to specify any
keys when you define properties.

SA just doesn't do the 'properties' automatically (by design I think).

Steve

On Feb 16, 12:14 pm, Andreas Jung [EMAIL PROTECTED] wrote:
 --On 16. Februar 2007 17:09:12 +0100 Andreas Jung [EMAIL PROTECTED] wrote:

  SA provide reflection support through Table(...autoload=True). Is there
  some extension for SA to include reflection support for relations?
  Otherwise you have specify the relationships using the 'properties' on
  your own.

 Sorry for this weird posting. Of course the  mapped class
 should obtain the additional properties as defined manually through
 'properties' automatically from the knowledge of the relations of the table
 instance.

 -aj

  application_pgp-signature_part
 1KDownload


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Reflection including Relations

2007-02-16 Thread Jonathan Ellis

You say defined manually... automatically.  It can't be both. :)

SA won't try to guess what properties you want on your mapped classes,
because it could guess wrong.  (Believe me, whatever pattern you are
thinking of, someone could find an exception where automatically
setting it up is not the right thing to do.)  Explicit is better than
implicit...

On 2/16/07, Andreas Jung [EMAIL PROTECTED] wrote:


 --On 16. Februar 2007 17:09:12 +0100 Andreas Jung [EMAIL PROTECTED] wrote:

  SA provide reflection support through Table(...autoload=True). Is there
  some extension for SA to include reflection support for relations?
  Otherwise you have specify the relationships using the 'properties' on
  your own.
 

 Sorry for this weird posting. Of course the  mapped class
 should obtain the additional properties as defined manually through
 'properties' automatically from the knowledge of the relations of the table
 instance.

 -aj


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---