Re: [sqlalchemy] Re: internationalization of content

2010-09-14 Thread werner
Hi Nil, On 14/09/2010 21:58, NiL wrote: Hi Werner, many thanks for your rich reply. I'm going to try an elixir implementation for now. If you want follow the thread of the same title in the elixir mailing list. Thanks for letting me know. One of the things which disturb me about SA or Elixi

Re: [sqlalchemy] complex mapped collection

2010-09-14 Thread Michael Bayer
On Sep 14, 2010, at 5:03 PM, A.M. wrote: > Hello, > > I have a schema like this: > > Image > *id > *name > > Metadatakey > *id > *exifkey > *name > > Metadata > *id > *image_id -> Image > *metadatakey_id -> Metadatakey > *value > > Is there any way for me to create a dictionary-based collect

[sqlalchemy] complex mapped collection

2010-09-14 Thread A.M.
Hello, I have a schema like this: Image *id *name Metadatakey *id *exifkey *name Metadata *id *image_id -> Image *metadatakey_id -> Metadatakey *value Is there any way for me to create a dictionary-based collection to represent the image metadata as Metadatakey.name=>Metadata.value ? After a

[sqlalchemy] Re: internationalization of content

2010-09-14 Thread NiL
Hi Werner, many thanks for your rich reply. I'm going to try an elixir implementation for now. If you want follow the thread of the same title in the elixir mailing list. I'll stay tuned to any sqla development best NiL -- You received this message because you are subscribed to the Google Gr

[sqlalchemy] Use regexp in like

2010-09-14 Thread Michael Hipp
Is it possible to use a regexp in a like() clause? Or some other way to achieve something similar? Thanks, Michael -- 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 f

Re: [sqlalchemy] internationalization of content

2010-09-14 Thread werner
Hi Nil, On 13/09/2010 23:37, NiL wrote: Hi all, I'm lookin for a good solution to internationalize the content of my application. that is provide many translations for the database content (as opposed to the translation of the application itself with babel/gettext for template and code message

Re: [sqlalchemy] Re: (Hopefully) simple problem with backrefs not being loaded when eagerloading.

2010-09-14 Thread Michael Bayer
On Sep 14, 2010, at 12:22 PM, Jon Siddle wrote: > Thank you for such a full elaboration. I still think the end result is > something a little unintuitive (albeit only for those using detached > objects, who will come across it); but I can't argue against your > decision here. Based on the informa

Re: [sqlalchemy] Re: (Hopefully) simple problem with backrefs not being loaded when eagerloading.

2010-09-14 Thread Jon Siddle
Thank you for such a full elaboration. I still think the end result is something a little unintuitive (albeit only for those using detached objects, who will come across it); but I can't argue against your decision here. Based on the information you've given, keeping things the way they are is un

Re: [sqlalchemy] on padded character fields again

2010-09-14 Thread Michael Bayer
On Sep 14, 2010, at 11:42 AM, Victor Olex wrote: > We have discussed one aspect of this before and it was hugely helpful > (http://groups.google.com/group/sqlalchemy/browse_thread/thread/ > 965287c91b790b68/361e0a53d4100b5d?lnk=gst&q=padding#361e0a53d4100b5d) > > This time I wanted to ask not ab

[sqlalchemy] on padded character fields again

2010-09-14 Thread Victor Olex
We have discussed one aspect of this before and it was hugely helpful (http://groups.google.com/group/sqlalchemy/browse_thread/thread/ 965287c91b790b68/361e0a53d4100b5d?lnk=gst&q=padding#361e0a53d4100b5d) This time I wanted to ask not about the WHERE clause but mapped object contents, where field

[sqlalchemy] Re: Updating a detached object

2010-09-14 Thread Alvaro Reinoso
Channel is type of object that I use in my application. I guess I think how I can solve this problem. I load some list of object using the option joinedload. I store those lists in HTTP session object, so I can manipulate them through the user session. When I update some object from those lists, ho

[sqlalchemy] Re: (Hopefully) simple problem with backrefs not being loaded when eagerloading.

2010-09-14 Thread Michael Bayer
On Sep 14, 6:03 am, Jon Siddle wrote: > I would agree with all of this if I understood why a) it takes an > appreciable number of function calls or b) "automatic decisionmaking" is > necessary. I don't think there's any ambiguity here, but again; perhaps > I'm missing something fundamental. The

[sqlalchemy] Re: Updating a detached object

2010-09-14 Thread Alvaro Reinoso
Channel is just type of object. I realize what my problem is. I don't know why my object isn't saved correctly. for chan in channels: if chan.id == channel.id: > >chan = session.merge(channel) > >break On Sep 13, 2:47 pm, Mic

Re: [sqlalchemy] passive_deletes/updates with sqlite

2010-09-14 Thread alex bodnaru
On 09/13/2010 05:49 PM, Michael Bayer wrote: > > On Sep 13, 2010, at 11:16 AM, alex bodnaru wrote: > >> hope my approach isn't too simplist, but onetomany is usually implemented in >> rdbms by an manytoone column or a few of them, with or without ri clauses: >> thus, >> a foreign key or an index.

[sqlalchemy] Re: internationalization of content

2010-09-14 Thread NiL
Hi chris, thanks for your reply. I guess it is not an application framework oriented question. It seems to me rather a question of database design/access. I have a pointer to modify the elixir versioning extension to provide this functionnality. It would be framework oriented, if we were talking

[sqlalchemy] Re: [elixir] problem with cascade deletes

2010-09-14 Thread alex bodnaru
hey yacine, friends, indeed the problem came partly because i haven't followed the traces of elixir close enough: i've used backref instead of inverse for manytoone relations. the only drawback of using inverse, is that it requires the inverse relation to really exist, hence it can't be implied.

Re: [sqlalchemy] paranoia - does flush ensure a unique id?

2010-09-14 Thread Chris Withers
On 13/09/2010 18:02, Chris Withers wrote: What ensures obj.id will be unique and will it always be unique, even in the case of high volumes of parallel writes to the database? Does it depend on the back end? Are any backends known not to work this way? In short, the unique constrant of the prim

Re: [sqlalchemy] internationalization of content

2010-09-14 Thread Chris Withers
On 13/09/2010 22:37, NiL wrote: Has anyone tried ti implement this ? a working solution ? willing to participate in a effort to provide a solution ? Isn't this something better suited to the application framework rather than the database framework (ie: not SQLAlchemy)? cheers, Chris -- You

Re: [sqlalchemy] (Hopefully) simple problem with backrefs not being loaded when eagerloading.

2010-09-14 Thread Jon Siddle
On 13/09/10 18:21, Michael Bayer wrote: On Sep 13, 2010, at 12:26 PM, Jon Siddle wrote: This relationship is satisfied as you request it, and it works by looking in the current Session's identity map for the primary key stored by the many-to-one. The operation falls under the realm of "laz