Lucky
Romet
Is there a repo for the website or should I just write up suggestions somewhere
Romet
Also, by any chance are any of you going to React London next week?
Lucky
Lucky
Probably you can even just create Pull requests there
Alexey
Lucky
Oh, sorry,
I thought you meant that.
Romet
fair enough, I'll have another look at it after work then
Romet
Haha, I don't think there's much of a chance there
Romet
We use Django & React at work so my company's sending me to React London. Figured it would be cool to meet up with any Pony users, had there been any
Alexey
Romet
Possibly, although I think the reaction I'd get to that suggestion is "we could just write the models.."
Alexey
Romet
I'll definitely bring it up once you do though
Lucky
Sorry, but pony 0.7.1 requires Python of one of the following versions: 2.7, 3.3-3.6. You have version 3.7.0a0
https://travis-ci.org/luckydonald/pbft/jobs/214432324
Alexander
I'll fix it tomorrow in dev version on GitHub
Anonymous
I have not started ponyorm yet but syntax looks like my beloved LINQ in MS EntityFramework
Anonymous
So I am dumping my learning SQLALCHEMY for this sure
Anonymous
I hope Pony gets more exposure
Anonymous
Popular = more tutorials and great learning resources
Anonymous
Anonymous
I mean if Pony ORM is known to poeple as much as SQLAlchemy we can have books, videos and courses to make learning easier for new comers
Anonymous
Okay
Anonymous
Great
Anonymous
Glad to hear
stsouko
Hello!
I use postgres schemas.
_table_ = (schema, 'molecule')
and then I run generate_mapping(create_tables=True) on existing db i receive:
DBSchemaError: Table "db_data"."molecule" cannot be created, because table "molecule" (with a different letter case) already exists in the database. Try to delete "molecule" table first.
but on sqlite db this works fine
stsouko
I remember this works also on postgres without schemas
Micaiah
What would be the best way to ask a Database object for all of its models?
Micaiah
Oh, I didn't know there was an entities attribute.
Micaiah
Is there a parent class for generic ORM errors?
Micaiah
PonyORM errors*
Alexey
Micaiah
Thanks!
Micaiah
Where can I import that from
Angel
gmail.com
Alexey
from pony.orm.core import OrmError
Micaiah
Perfect, thanks
Lucky
gmail.com
Best answer :D
I like your humor
Angel
jajajajajajaja
Anonymous
Hi everyone]
Anonymous
I just found this ORM
Anonymous
and want to learn more
Anonymous
I know few about python code, and not with database such as SQL,oracle, etc
Anonymous
so basically I know only python code
Anonymous
Hello
BEast
Hi. So, what's your question?
Anonymous
I am wondering if there is a migration tools for pony yet
Alexander
The migration tool is unreleased yet. At this moment we are trying to using it and discover some bugs. We want to fix the most critical bugs before the migration tool is released, because bugs in migration tool can lead to database corruption. I hope we will release it soon.
Anonymous
Okay..
Anonymous
Is it convenient to use this ORM within django?
Alexander
Many components in Django (for example, admin UI) assume that you use Django-ORM and will not work otherwise
Anonymous
Ouu...
Anonymous
I have slow internet connection
Anonymous
So I haven't try the online editor that Pony ORM had
Anonymous
Does it works like sqlyog or something?
Anonymous
Is there any offline one?
Alexander
I have no experience with SQLyog, but from the first look it presents schema in terms of tables, while Pony editor present it in terms of entities. It's online-only
Alexey
Is there any offline one?
You can work with the editor offline. You need the connection only when you open the diagram and when you save it.
Lucky
Yeah we are waiting for a selfhostable version too
Lucky
Would be great
Micaiah
Pony is rewritting how it names rows in tables for the next version correct?
Alexander
Yes
Micaiah
Will the rewrite allow for
class A(db.Entity):
name = Required(str)
class B(A):
name = Required(str)
other = Optional(int)
Micaiah
Oops I wrote the example wrong
Micaiah
Okay fixed it
Alexander
No, in the next release we will just changes names of many-to-many tables and the corresponding indexes/foreign keys
Why you want to define schema like in your example?
Micaiah
I want to have a generic Entity subclass with helper methods, where unrelated tables might have similar fields
Alexander
If B inherits an attribute from A, it doesn't need to redefine it. If it is actually an attribute with a different meaning, maybe you can give it slightly different name
Micaiah
Okay thanks, I'll do that
Alexander
Be aware, that currently if one entity inherits from another, they share the same table
Micaiah
Yeah I think that the helper entity just won't have any columns of its own
Micaiah
Actually I think I could get away with a Mixin
Micaiah
which doesn't actually inherit from Entity
Romet
If one entity inherits another and the table is shared, can the child's columns even be non-nullable?
Alexander
no, it may be required, in a sense that Pony will check in Python, that the object instances with that column have a non-empty value in it. But in the table the column will be declared as nullable