Hello Isoscale,

>  I intend to write ORM code that will create views and triggers in the
> database? Which parts of the source code should I alter?

I use django to access views commonly, primarily for reporting I'll
create views taking care of the complex joins from our ERP so
developers can easily use the ORM.  There are a few things to keep in
mind if you want to use the ORM to access views especially if they are
based on external tables.

  1. ORM expects tables with a single PK
  2. Don't add views into your models.py use another file to define
them

The first one is very important you'll need to come up with a single
unique identifier for each row which can be a concatenated string etc.
If you are using oracle you can use rownum see notes at <http://
projects.django-development.info/trac/dd_dd/wiki/
Creating_Django_Views_of_Tables>.     Can you explain the your purpose
that requires you to create views and triggers.

Hope this helps,
Mark


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to