groupwrite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

groupwrite

Maarten Mostert
Hi,

To speed up things I am trying to minimise the number of units of work I use, and now I am stumbling on the following.

The situation is as follows:
I am importing an XML file with numerous items in a single unit of work (no problem).
I then suppress them all while recording their parameters including all the primary keys also in a single unit of work with no problem.

However, when I re-insert the objects with their known primary keys in the database (SQLLite in this case) all goes well if I do it row after row.

However when I do a group write Glorp request a new Sequence which consequently fails with an "Inconsistent values in field" error.


I notably find the following:

optimized [] in Glorp.SQLite3Sequence>>postWriteAssignSequenceValueFor:inRows:using:
Receiver:
an UndefinedObject
Arguments:
ithrow = a Glorp.DatabaseRow(MMT_RESOURCES)
    Field(MMT_RESOURCES.res_id)->2
    Field(MMT_RESOURCES.parent)->1
    Field(MMT_RESOURCES.res_name)->'Business Analyst'
    Field(MMT_RESOURCES.res_innitials)->'B'
    Field(MMT_RESOURCES.res_order)->3
    Field(MMT_RESOURCES.res_expanded)->1
    Field(MMT_RESOURCES.res_type)->2
    Field(MMT_RESOURCES.res_immatricule)->''
    Field(MMT_RESOURCES.res_uuid)->'bdcc77e3-9ba8-4e8a-a482-55c1648219f0'
    Field(MMT_RESOURCES.res_iscostresource)->0
    Field(MMT_RESOURCES.res_email)->nil
    Field(MMT_RESOURCES.res_avail_from)->nil
    Field(MMT_RESOURCES.res_avail_to)->nil
    Field(MMT_RESOURCES.res_std_rate)->0.0d
    Field(MMT_RESOURCES.res_ovt_rate)->0.0d
    Field(MMT_RESOURCES.res_cost_peruse)->nil
    Field(MMT_RESOURCES.res_msp_uid)->1
    Field(MMT_RESOURCES.res_maxunits)->100
    Field(MMT_RESOURCES.res_utc)->'2017-05-09 15:32:46'

Temporaries:
.aDatabaseField = Field(MMT_RESOURCES.res_id)
lastValue = 7     
Context PC = 8


For as far as I understand it the group write command cleary want a fresh primary key « 7 »  in this case while the original and available primary key  « res_id =  2 »  is avaiable.

Any explanations ? Do I do something wrong could this be due to binding ?

This is 8.2.1

Regards,

Maarten MOSTERT

 

 

28 Av Alphonse Denis
83400 Hyères, France
+33 676411296 

Now the most popular Project Management Tool on MacOS

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.