#336: bhdashboard.model.ModelBase insert method fails if no unique fields
specified
--------------------------+--------------------
 Reporter:  franco        |      Owner:  nobody
     Type:  defect        |     Status:  new
 Priority:  critical      |  Milestone:
Component:  multiproduct  |    Version:  0.3.0
 Keywords:                |
--------------------------+--------------------
 When a persistent class that extends ModelBase has an empty list of unique
 fields specified in the metadata, as it is the case of ProductResourceMap
 and there is at least one record in the table, every insert attempt fails
 indicating TracError: [object_name]  already exists.

 The problem is that inside the insert method, there is an attempt to find
 if there is some record in the database that matches the unique fields
 values of the record to be inserted.


 This select always returns some values if the unique fields meta is an
 empty list.


 There should be an evaluation previous to the query, to ensure that the
 query is made only if there is some value indicated in the unique fields
 meta data.

 PD. I find no component good enough to relate this ticket to...
 multiproduct seems to be the closest one since it was the first component
 using ModelBase

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/336>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Reply via email to