=
session.query(BlogPost.keyword_id).distinct().all()
But how to do that for many-to-many relation?
Regards,
Michal
On Monday, December 19, 2016 at 6:19:22 PM UTC+1, Jonathan Vanasco wrote:
>
>
>
> On Monday, December 19, 2016 at 11:26:31 AM UTC-5, Michal Nowikowski wrote:
>>
Hello,
I have a problem with building a query where I'm using many-to-many
relation.
Let's take the example from tutorial:
http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#building-a-many-to-many-relationship
Imagine that we have many Keywords but not all of them are used (not all
are ass
Great, it works.
Thank you very much.
Regards,
Michal
On Tuesday, December 1, 2015 at 6:49:05 PM UTC+1, Jonathan Vanasco wrote:
>
> I don't think you can get that exact query staying within the ORM's
> cross-platform functionality -- I don't think there is anything that can
> generate the `::`
Hello,
I'm using Postgresql and JSONB column.
I would like to write a query using ORM that will generate such SQL query:
SELECT id,name,details FROM Device WHERE details::text LIKE '%99%';
where details is of JSONB type and it is converted to text and then like
operator is used.
Generally
nteger),
> Column('amount', DECIMAL(7, 2)),
> Column('tr_date', Date),
> mysql_engine='InnoDB',
> mysql_partition_by='HASH( MONTH(tr_date) )',
> mysql_partitions='6'
> )
Hello,
MySQL supports partitioning:
http://dev.mysql.com/doc/refman/5.5/en/partitioning-overview.html
It requires special CREATE TABLE statement.
Is it possible to make use of this partitioning in SA?
How to do this?
Regards,
Godfryd
--
You received this message because you are subscribed to t
Thanks,
SET sql_mode=ANSI_QUOTES;
solved my problem.
Regards,
Godfryd
On Wednesday, May 8, 2013 4:26:35 PM UTC+2, Michael Bayer wrote:
>
>
> On May 8, 2013, at 12:33 AM, Michal Nowikowski
> >
> wrote:
>
> Hello,
>
> I'm using PostgreSQL and MySQL databas
Hello,
I'm using PostgreSQL and MySQL databases and unfortunately my table names
are CamelCase.
I have a problems with quoting in raw queries that it works for both
dialects.
1. following query works in MySQL and fails in PostgreSQL:
s = sqlalchemy.text('select max(version) from DatabaseSch
q = q.outerjoin(b2, sqlalchemy.and_(A.id == b2.a_id, b2.c_id == 70))
q = q.filter(sqlalchemy.or_(b1.id != None, b2.id != None))
Regards,
Godfryd
On Monday, March 25, 2013 6:22:30 PM UTC+1, Michael Bayer wrote:
>
>
> On Mar 25, 2013, at 1:54 AM, Michal Nowikowski
> >
&g
Hello,
I need to do double outer join on following 2 tables A and B to get
presented result using ORM query or SQL expressions.
Table B should be outer joined twice to get joined 2 result sets
(distinguished by c_id) that are for the same A records. Outer join is used
to get NULLs where B re
1' variables). It deliberately
> doesn't update them.
[cut]
> You may also be interested in the refresh/expire methods of session:
>
> http://www.sqlalchemy.org/docs/unitofwork.html#unitofwork_api_refreshexpire
Thanks. expire/refresh
t1')})
> do check doco, just in case.
Nope, it doesn't work :(
In docs there is only about lazy parameter that should work for this
but it does not :(
Probably I misunderstood something.
Regards
Michal Nowikowski
--~--~-~--~~~---~--~~
You received this
ery for first row in
t1, I see one
element in collection t2s - it is ok.
Then when I add second row to t2, the collection in t1 object is not
updated.
It still contains only one element.
Example below.
Could you tell me how to refresh collection in one-to-many relation???
Regards
Michal Nowik
13 matches
Mail list logo