Ticket #416 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

QDataGrid filter doesn't render on reverse QQReverseReferenceNode

Reported by: dugokontov Owned by:
Priority: important Milestone: 1.1.1 Stable
Component: Framework Version: 1.1 Development
Keywords: Cc:

Description

When I add column using
MetaAddColumn?(QQN::Node()->SomeReverseReferenceNode?->Filed) filter text boxes don't show up.

Problem is that when QCubed generate QQReverseReferenceNode classes it sets 'string' as a node type. In SetFilteredDataGridColumnFilter?'s switch-case no check for 'string' type is made. When this check is added, everything works smoothly.

Same thing was with DateTime? filed, as I guess it's same for every type.

Attachments

patch416.patch Download (1.1 KB) - added by dugokontov 3 years ago.
I small one patch (:
ticket416.patch Download (1.8 KB) - added by VexedPanda 3 years ago.
Ahh, ok, I think I see where this could be coming from. Looks like I missed reverse references in that ticket. Try this patch.

Change History

Changed 3 years ago by dugokontov

I small one patch (:

Changed 3 years ago by VexedPanda

  • status changed from new to infoneeded_new

As of #158, strType does not hold a QType, it holds a QDatabaseFieldType.

This is why it doesn't check for QType::String. That's no longer a valid option, and should never occur.

Changed 3 years ago by VexedPanda

Are you sure your qcubed/_core/codegen/templates/db_orm/class_gen/qcodo_query_classes.tpl file is up to date, and you're not overriding it with old code?

Changed 3 years ago by dugokontov

Yes... I updated Qcubed from svn, and then generated code. Problem is when you have some sort of this database relation:

table:persons
id (PK)
name

table: departments:
id pk
headmaster_id (FK on persons, Unique)
name

When code is generated, QQReverseReferenceNode for Department in table Persons should be generated. And this node is of type string.

Changed 3 years ago by VexedPanda

Ahh, ok, I think I see where this could be coming from. Looks like I missed reverse references in that ticket. Try this patch.

Changed 3 years ago by VexedPanda

  • status changed from infoneeded_new to new

Changed 3 years ago by VexedPanda

  • status changed from new to in_QA

Changed 3 years ago by alex94040

  • summary changed from QDataGrif filter doesn't render on reverse QQReverseReferenceNode to QDataGrid filter doesn't render on reverse QQReverseReferenceNode

Changed 3 years ago by dugokontov

this works also... very good (:

Changed 3 years ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

(In [698]) Fixes #416 (QDataGrid filter doesn't render on reverse QQReverseReferenceNode). Code by VexedPanda?; reviewed by alex94040; tested by dugokontov.

Changed 3 years ago by alex94040

(In [797]) Fixes #416: Redo QImageRollover to use jQuery + new example for it. Code by kristof; example by alex94040. Test/code review by alex94040.

Changed 3 years ago by alex94040

  • status changed from closed to new
  • resolution fixed deleted

Ignore the previous notes on the checkin - [797] has nothing to do with this ticket. It's about #461.

Changed 3 years ago by alex94040

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.