Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
419 views
in Technique[技术] by (71.8m points)

ponyorm - 小马ORM-相关对象的顺序(Pony ORM - order of related objects)

I have an entity model A that has one-to-many relation to entity model B and that relation is defined as Set() .

(我有一个实体模型A,它与实体模型B具有一对多关系,并且该关系定义为Set() 。)

Is there any possibility to retrieve A entities with set of B sorted in particular order of some attribute of B?

(是否有可能检索按B的某些属性的特定顺序排序的B集的A实体?)

Django has something like that and I believe this is possible with SQLAlchemy too but I can't find anything like that in Pony.

(Django有类似的东西,我相信SQLAlchemy也可以实现,但是我在Pony中找不到类似的东西。)

Example: list of poll entities (A) with options (B) sets sorted by option title.

(示例:按选项标题排序的带有选项(B)集的民意测验实体(A)列表。)

  ask by zgoda translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...