If I'm understanding correctly...
You're on the right track. I'd use a composite primary key on
|team_person|, consisting of foreign keys from |person| and |team|, and
another composite key (or unique index) on the |team| to |tournament|
table. This lets the database do all the work.
-Derek
.all()
return {
'total_count': count,
'data':data
}
On Monday, April 1, 2019 at 11:10:52 AM UTC-5, Derek Lambert wrote:
>
> Is it possible to return a query's results as a dictionary containing the
> total count and a limited por
I've implemented some property objects based on the dictlike-polymorphic.py
example.
I'm writing unit tests for my code and noticed the value deleter is
attempting to call an undefined method _set_value. What was intended here?
I've got some jankey code I'm using to delete properties from the
fix
>
> On Fri, Oct 19, 2018 at 4:38 PM Mike Bayer > wrote:
> >
> > On Fri, Oct 19, 2018 at 2:30 PM Derek Lambert > wrote:
> > >
> > > I'm replying to my original post since it's related.
> > >
> > > I'm still seeing missing s
define AnotherChild
identical to ActiveDirectoryGroup, but there are additional synonyms on
ActiveDirectoryGroup they both should have.
Thanks,
Derek
On Wednesday, May 9, 2018 at 2:16:22 PM UTC-5, Derek Lambert wrote:
>
> That was my conclusion too after consulting the googles.
>
&g
Just define the naming convention dict in a separate file and import it
into each declarative base?
On Wednesday, September 5, 2018 at 4:18:44 AM UTC-5, René-paul Debroize
wrote:
>
> It would have been great to be able to do it via a mixin, I have several
> DB using decalarative base
Doh that's exactly what I need. Need to read through the docs again, I
missed that parameter.
Thanks!
On Monday, August 6, 2018 at 4:46:57 PM UTC-5, Mike Bayer wrote:
>
> On Mon, Aug 6, 2018 at 4:14 PM, Derek Lambert > wrote:
> > I do want it to tell me when stuff is being ea
side I get the warning:
SAWarning: On Person.category, 'passive_deletes' is normally configured on
one-to-many, one-to-one, many-to-many relationships only.
If I move the passive_deletes to the "one" side I get the exception again.
On Friday, August 3, 2018 at 2:29:45 PM UTC-5, Derek Lam
When deleting a child object in a one-to-many relationship retrieved with
the raiseload('*') query option an exception is raised. Adding
passive_deletes=True to the relationship on the child prevents the
exception, but that seems like a hack.
I can remove the option from the query, but I'm
('Design')),
...
...
)
)
instead of performing multiple queries.
On Wednesday, May 30, 2018 at 12:50:40 PM UTC-5, Mike Bayer wrote:
>
> On Wed, May 30, 2018 at 12:39 PM, Derek Lambert
> > wrote:
> > Outside of checking the discriminator value is it
Outside of checking the discriminator value is it possible to filter a
query by a class in an inheritance mapping?
class Employee(Base):
__tablename__ = 'employee'
id = Column(Integer, primary_key=True)
name = Column(String(50))
type = Column(String(20))
__mapper_args__ = {
That was my conclusion too after consulting the googles.
I've done as you suggested and things are working as expected. Thanks!
On Monday, April 30, 2018 at 4:26:02 PM UTC-5, Mike Bayer wrote:
>
> On Mon, Apr 30, 2018 at 4:18 PM, Derek Lambert
> <dlam...@dereklambert
s,
Derek
On Monday, April 30, 2018 at 1:30:51 PM UTC-5, Mike Bayer wrote:
> On Mon, Apr 30, 2018 at 1:33 PM, Derek Lambert
> <dlam...@dereklambert.com > wrote:
> > I'm running into an issue in a hierarchy of single-table inheritance
> objects
> > with multiple
I'm running into an issue in a hierarchy of single-table inheritance
objects with multiple inheritance. The objects represent users/groups/etc.
from various directories and applications.
Retrieving the list of synonyms from an object at the bottom of the
inheritance tree doesn't return the
, 2018 at 2:02:00 PM UTC-5, Derek Lambert wrote:
>
> I'm probably overlooking something simple, looking for feedback before
> opening an issue.
>
> I have some objects with relationships defined between. When I create a
> new related object and pass it in the append() method
I'm probably overlooking something simple, looking for feedback before
opening an issue.
I have some objects with relationships defined between. When I create a new
related object and pass it in the append() method of the collection
everything works as expected, the foreign key is set. When I
I created a parser using pyparser that takes a filter string similar to
what you'd pass to Query.filter(), and returns an object you can pass to
Query.filter(). ex. "Child.last_name == 'Smith' AND Child.first_name LIKE
'J%' OR Child.parent_id IS NULL". This was to allow storing the query
Michael (or anyone listening),
In my example code in #4202
(https://bitbucket.org/zzzeek/sqlalchemy/issues/4202/associationproxy-no-longer-resolved-to)
you mentioned the assocaition proxy to the plain members @property is
probably not a supported pattern.
It's working in my code, but I'd
18 matches
Mail list logo