ango-users@googlegroups.com [mailto:
> django-users@googlegroups.com] *On Behalf Of *b...@tanners.org
> *Sent:* Monday, May 6, 2019 12:44 PM
> *To:* Django users
> *Subject:* Re: ORM help with INNER JOIN and GROUP BY
>
>
>
> Just want to make sure I understand. ForeighKeys need to be inte
; *From:* django...@googlegroups.com [mailto:
> django...@googlegroups.com ] *On Behalf Of *b...@tanners.org
>
> *Sent:* Monday, May 6, 2019 11:28 AM
> *To:* Django users
> *Subject:* ORM help with INNER JOIN and GROUP BY
>
>
>
> I've inherited an application written
Maybe that was a typo?
The foreignkey relationship would look like this:
object = models.ForeignKey(FacePng'', max_length=128, blank=False,
null=False, unique=True)
On Mon, May 6, 2019 at 12:44 PM wrote:
> Just want to make sure I understand. ForeighKeys need to be integers?
>
> Only integers?
: Re: ORM help with INNER JOIN and GROUP BY
Just want to make sure I understand. ForeighKeys need to be integers?
Only integers?
You need a ForeignKey relationship between the two models, which is an integer
value, not a char. You’d have to do migrations to get this adjusted properly.
--
You
Just want to make sure I understand. ForeighKeys need to be integers?
Only integers?
You need a ForeignKey relationship between the two models, which is an
> integer value, not a char. You’d have to do migrations to get this adjusted
> properly.
>
--
You received this message because you
The field within your class should be set to ForeignKey.
Try this:
Object = models.ForeignKey(‘FacePng’, on_delete=SET_NULL, max_length= some_int)
on_delete and max_length need to be set based on your requirements
Sent from my iPhone
> On May 6, 2019, at 11:28 AM, b...@tanners.org wrote:
>
users
Subject: ORM help with INNER JOIN and GROUP BY
I've inherited an application written django 1.11. The old application uses
raw() with INNER JOIN and GROUP BY.
I cannot seem to figure out how to do inner join and group by properly the ORM
way.
The raw() query is below.
SELECT
I've inherited an application written django 1.11. The old application uses
raw() with INNER JOIN and GROUP BY.
I cannot seem to figure out how to do inner join and group by properly the
ORM way.
The raw() query is below.
SELECT * FROM items_monolithic
INNER JOIN items_facepng
ON
8 matches
Mail list logo