Hi devs, thanks for replies!
Michael: I asked probably wrong question. I know how to make property read-only in Python, but I wanted the property to be read-only at ORM level (so it will not appear in UPDATE). Mark: This is probably is solution to my problem. I'm trying to create an abstract wrapper for ordered-list records. I wanted to post example which describes what I'm doing, but I will create another topic when basic features will be working. Best regards Petr On Mon, Aug 30, 2010 at 3:59 AM, Mark <zhengha...@gmail.com> wrote: > Hi Petr, > > You may want to have a look at this link > http://www.sqlalchemy.org/docs/mappers.html#building-query-enabled-properties > > Setting the viewonly=True property in your mapper configuration does > exactly what you want. I've used it a couple of times in my own > project and it works. > > -Mark > > On Aug 29, 10:00 pm, Petr Kobalíček <kobalicek.p...@gmail.com> wrote: >> Hi devs, >> >> is there a simple way how to make an ORM property read only? I need to >> fetch the column from database so it will be accessible through the >> mapped class, but I need that the property will be never updated back >> to the database (in case I add the object to the session and do >> commit). >> >> Thanks! >> >> Best regards >> Petr Kobalicek > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.