Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:38:12+00:00 2026-06-06T05:38:12+00:00

I’m working on a django-nonrel project running on Google’s AppEngine. I want to create

  • 0

I’m working on a django-nonrel project running on Google’s AppEngine. I want to create a model for a Game which contains details which are generally common to all sports – i.e. gametime, status, location, etc. I’ve then modelled specific classes for GameBasketball, GameBaseball etc, and these inherit from the base class.

This creates a problem however if I want to retrieve something like all the Games on a certain day:

Game.objects.filter(gametime=mydate)

This will return an error:

DatabaseError: Multi-table inheritance is not supported by non-relational DBs.

I understand that AppEngine doesn’t support JOINs and so it makes sense that this fails. But I’m not sure how to properly tackle this problem in a non-relational environment. One solution I’ve tried is to turn Game into an abstract base class, and while that allows me to model the data in a nice way – it still doesn’t resolve the use case above since its not possible to get objects for an abstract base class.

Is the only solution here to put all the data for all possible sports (and just leave fields that aren’t relevant to a specific sport null) in the Game model, or is there a more elegant way to solve this problem?

EDIT:
I’m more interested in understanding the correct way of handling this type of issue in any noSQL setup, and not specifically on AppEngine. So feel free to reply even if your answer isn’t GAE specific!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:38:15+00:00Added an answer on June 6, 2026 at 5:38 am

    The reason multi-table inheritance is disallowed in django-nonrel is because the API that Django provides for those sort of models will often use JOIN queries, as you know.

    But I think you can just manually set up the same thing Django would have done with it’s model inheritance ‘sugar’ and just avoid doing the joins in your own code.

    eg

    class Game(models.Model):
        gametime = models.DateTimeField()
        # etc
    
    class GameBasketball(models.Model):
        game = models.OneToOneField(Game)
        basketball_specific_field = models.TextField()
    

    you’ll need a bit of extra work when you create a new GameBasketball to also create the corresponding Game instance (you could try a custom manager class) but after that you can at least do what you want, eg

    qs = Game.objects.filter(gametime=mydate)
    qs[0].gamebasketball.basketball_specific_field
    

    django-nonrel and djangoappengine have a new home on GitHub: https://github.com/django-nonrel/

    I’m not convinced, next to the speed of GAE datastore API itself, that the choice of python framework makes much difference, or that django-nonrel is inherently slower than webapp2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.