Hello,
I experience some strange behaviour from polymorphic mappers. It seems
that convert_result_value doesn't get called for all columns of
polymorphic mappers.
Here's a modified polymorhpic example from sqlalchemy distribution
(also in an attach):
=
On Jul 18, 2006, at 11:18 PM, Daniel Miller wrote:
> Take a look at this example in the Hibernate documentation:
>
> http://www.hibernate.org/hib_docs/v3/reference/en/html/example-
> parentchild.html#example-parentchild-bidir
>
> Hibernate does not automatically add child to parent.children when
Michael Bayer wrote:
> youre basically saying that Hibernate supports mutation operations
> upon instrumented collections, without it needing to load the full
> state of those collections from the database. how would this
> support the add() method on Set (need to replace an existing item
Michael Bayer wrote:
> On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>
>
>>SQLError: (IntegrityError) null value in column "project_id" violates
>>not-null constraint
>> 'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
>>documents.id = %(documents_id)s' {'project_id': None,
i think you underestimate how destablizing and complicated this
feature would really be.
youre basically saying that Hibernate supports mutation operations
upon instrumented collections, without it needing to load the full
state of those collections from the database. how would this
sup
Michael Bayer wrote:
>
> you might want to try:
>
> mapper (someclass, sometable, properties = {
> 'rels' : relation(someotherclass, lazy=None)
> })
>
> which will turn off all loading on the "rels" attribute.im not sure
> how well thats going to work since it hasnt
in fact its not supposed to be eager loading, since self-referential
eager loads are not supported. set lazy=True to fix this issue.
On Jul 18, 2006, at 7:01 PM, Sol wrote:
> Michael Bayer wrote:
>> for this program, move the "managers" property after the
>> compilation of
>> the other map
On Jul 18, 2006, at 5:54 PM, Randall Smith wrote:
>
> SQLError: (IntegrityError) null value in column "project_id" violates
> not-null constraint
> 'UPDATE planreview.documents SET project_id=%(project_id)s WHERE
> documents.id = %(documents_id)s' {'project_id': None,
> 'documents_id': 13}
>
Michael Bayer wrote:
> for this program, move the "managers" property after the compilation of
> the other mappers:
>
> person_mapper.compile()
> person_mapper.add_property('managers', relation(Manager,
> secondary=people_managers, lazy=False))
>
> this is a workaround for this particul
I'm getting unexpected behavior when deleting a record with a foreign
key. I'm using the 0.2.5 rev 1712. When I delete a record that has a
private=True attribute in the FK relationship, SA tries to update the
record and set the FK to NULL instead of deleting the record.
Applicable code. I tr
for this program, move the "managers" property after the compilation
of the other mappers:
person_mapper.compile()
person_mapper.add_property('managers', relation(Manager,
secondary=people_managers, lazy=False))
this is a workaround for this particular issue.
On Jul 16, 2006,
small working test script that uses sqlite. you can post a ticket or
send an email to the list.
On Jul 18, 2006, at 5:08 PM, Sol wrote:
> Hello,
> tinkered a little more on the problem but got nowhere. Should i
> create a
> ticket on the topic?
>
> Cheers, Sol.
>
>
> Sol wrote:
>> Hello agai
Hello,
tinkered a little more on the problem but got nowhere. Should i create a
ticket on the topic?
Cheers, Sol.
Sol wrote:
> Hello again,
>
>
>>the mapper associated with select_table is not getting compiled. this
>>is a product of the simplification to mapper compilation which compiles
>>a
On Jul 18, 2006, at 1:12 PM, William K. Volkman wrote:
> I agree that this is perhaps more of an application issue however
> there is some logic that supports the idea that across multiple
> applications the business logic should go into the database.
> What I interpret him asking for is basicall
On Jul 18, 2006, at 4:57 AM, Julien Cigar wrote:
> Ok, I will try the association object, it looks better !
>
> Another question, I'm using SQLAlchemy with mod_python. That means
> that a Python interpreter is loaded in each apache process (in
> prefork mode). In my application I use a global
On Tue, 2006-07-18 at 09:32, Michael Bayer wrote:
> On Jul 18, 2006, at 9:52 AM, Charles Duffy wrote:
>
> > Anyhow, as I was saying, it looks like it should be possible to attach
> > the object to the exception in Mapper.save_obj() so you can find out
> > which object the issue is related to. The
heres something in rev 1718 you can try:
from sqlalchemy import synonym
mapper(PropertyClass, table,
properties = {
'_hash': table.c.hash,
'hash':synonym('_hash')
},
)
results = session.query(PropertyClass).select_by(hash="a b")
im a little antsy on th
you might want to try:
mapper (someclass, sometable, properties = {
'rels' : relation(someotherclass, lazy=None)
})
which will turn off all loading on the "rels" attribute.im not
sure how well thats going to work since it hasnt been tested ve
On Jul 18, 2006, at 9:52 AM, Charles Duffy wrote:
> Anyhow, as I was saying, it looks like it should be possible to attach
> the object to the exception in Mapper.save_obj() so you can find out
> which object the issue is related to. The component of what you
> suggested I have serious concerns a
With regard to the nested transaction suggestion, I was hoping that this
would allow an inner transaction to be rolled back after encountering an
error, such that the outer transaction could continue (which I
understand to be the behavior you're wanting, right?). Also, by
segmenting the changes int
On 7/18/06, Charles Duffy <[EMAIL PROTECTED]> wrote:
Yuan HOng wrote:
> One possibility is to clear the session cache, which however would
> mean other valid changes would also be clear out and got lost.
> Therefore I would like SA to inform the application which is the
> object that caused the c
Yuan HOng wrote:
> One possibility is to clear the session cache, which however would
> mean other valid changes would also be clear out and got lost.
> Therefore I would like SA to inform the application which is the
> object that caused the current SQL exception and then remove the
> specific obj
Ok, I will try the association object, it looks better !
Another question, I'm using SQLAlchemy with mod_python. That means that
a Python interpreter is loaded in each apache process (in prefork mode).
In my application I use a global session object per process (which is
not threadsafe, but.. I
23 matches
Mail list logo