Bug report #12637

Primary key set to null when using Identify on layer or editing a child table.

Added by cgsbob - over 9 years ago. Updated about 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Matthias Kuhn
Category:Relations
Affected QGIS version:2.8.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:Yes Copied to github as #:20752

Description

I've finally gotten around to using QGIS 2.8.1 with my borehole project (which was working fine on QGIS 2.4).

Now when I use the Identify tool on an editable layer that uses QGIS Relations, click OK, then toggle off edit mode, I get the "Do you want to save..." dialog box (which didn't happen in 2.4). So, I cancel and look at the layers attribute table and see that the primary key, which uses the Relation Reference Widget(RRW), is set to null.

Also, when I enter data in a child table, it saves fine. I when I click on same record, I see all the data for that record but the RRW is blank. If I switch to table view, I can see that the primary key is not null. If I toggle off edit mode, I once again get the "Do you want to save..." dialog box.

relations.png (128 KB) cgsbob -, 2015-04-27 09:52 AM

QGISRelationProb.pdf (189 KB) cgsbob -, 2015-04-28 02:18 PM

History

#1 Updated by Matthias Kuhn over 9 years ago

  • Which kind of feature form are you using (autogenerated, drag and drop or ui file)?
  • Do you have the custom widgets package installed?

#2 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Open to Feedback

#3 Updated by cgsbob - over 9 years ago

Matthias Kuhn wrote:

  • Which kind of feature form are you using (autogenerated, drag and drop or ui file)?
  • Do you have the custom widgets package installed?

These features are point features using autogenerated forms and there are no custom widgets. The datasource I'm using is Spatialite from OSGeo4W 64 bit. I've attached a screenshot of the Project Properties>Relations dialog box.

#4 Updated by cgsbob - over 9 years ago

cgsbob - wrote:

Matthias Kuhn wrote:

  • Which kind of feature form are you using (autogenerated, drag and drop or ui file)?
  • Do you have the custom widgets package installed?

These features are point features using autogenerated forms and there are no custom widgets. The datasource I'm using is Spatialite from OSGeo4W 64 bit. I've attached a screenshot of the Project Properties>Relations dialog box.

I forgot to say that, I'm getting the same behavior in QGIS 2.8.1 under Linux.

#5 Updated by Giovanni Manghi over 9 years ago

  • OS version deleted (8.1)
  • Operating System deleted (Windows)
  • Target version changed from Version 2.8.1 to Version 2.8.2

#6 Updated by cgsbob - over 9 years ago

I've also uploaded a PDF that shows what happens in the attribute table.

#7 Updated by Jürgen Fischer over 9 years ago

  • Target version changed from Version 2.8.2 to Future Release - High Priority
  • Status changed from Feedback to Open

#8 Updated by Matthias Kuhn over 9 years ago

Can you add information about the widget configuration + data types?

Some screenshots from the vector layer field properties of the child table plus the project file (sample data would be nice but not strictly required) would help a lot.

#9 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Open to Feedback

#10 Updated by Nyall Dawson about 9 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Closed due to lack of feedback

Also available in: Atom PDF