writeTheOrderField and 'Incosistent values in Row'

Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

writeTheOrderField and 'Incosistent values in Row'

jtuchel
Hi,

it seems like RelationshipMappings that #writeTheOrderField cannot be updated. Every time the order of the objects in that 1:n relationship changes, I get a GlorpWriteExceptioon with 'Inconstent values in Row'.

Is that intended behavior?

Joachim



--
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.
Reply | Threaded
Open this post in threaded view
|

Re: writeTheOrderField and 'Incosistent values in Row'

jtuchel
Sorry, the Exception says "Inconsistent values in field"  not row.
And it complains about the SORT attribute, which is not mapped to an inst var, just derived from the position in the Collection.

Here is what my mapping looks like:

    (aDescriptor newMapping: OneToManyMapping)
        attributeName: #feldMappings;
        referenceClass: BankAuszugCSVFeldMapping;
        orderBy: [:ea | (ea getTable: 'AUSZUG_CSV_FELD') getField: 'SORT'];
        beExclusive;
        writeTheOrderField

And the exception is thrown in FieldValueWrapper>>#contents:

Any thoughts?

Joachim



Am Freitag, 12. Januar 2018 10:20:31 UTC+1 schrieb jtuchel:
Hi,

it seems like RelationshipMappings that #writeTheOrderField cannot be updated. Every time the order of the objects in that 1:n relationship changes, I get a GlorpWriteExceptioon with 'Inconstent values in Row'.

Is that intended behavior?

Joachim



--
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.
Reply | Threaded
Open this post in threaded view
|

Re: writeTheOrderField and 'Incosistent values in Row'

Alan Knight
I don't think that's intended. When it says inconsistent values in field it means that two different sources have written different values to the same field in the same row. One useful way to debug this is to send debugWrite to the mapping. Then it will halt any time that mapping writes, and you should be able to see where the values are coming from in each case.

On Fri, Jan 12, 2018 at 1:24 AM jtuchel <[hidden email]> wrote:
Sorry, the Exception says "Inconsistent values in field"  not row.
And it complains about the SORT attribute, which is not mapped to an inst var, just derived from the position in the Collection.

Here is what my mapping looks like:

    (aDescriptor newMapping: OneToManyMapping)
        attributeName: #feldMappings;
        referenceClass: BankAuszugCSVFeldMapping;
        orderBy: [:ea | (ea getTable: 'AUSZUG_CSV_FELD') getField: 'SORT'];
        beExclusive;
        writeTheOrderField

And the exception is thrown in FieldValueWrapper>>#contents:

Any thoughts?

Joachim




Am Freitag, 12. Januar 2018 10:20:31 UTC+1 schrieb jtuchel:
Hi,

it seems like RelationshipMappings that #writeTheOrderField cannot be updated. Every time the order of the objects in that 1:n relationship changes, I get a GlorpWriteExceptioon with 'Inconstent values in Row'.

Is that intended behavior?

Joachim



--
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.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: writeTheOrderField and 'Incosistent values in Row'

jtuchel
Alan,


thanks a lot for the tip. debugWrite is really helpful and I hadn't heard of it before.

It turns out I made a mistake in my code when I tried to be Überclever: I ended up with the same instance in the collection twice! So the very same object would be attempted to be saved twice, each with another sort key ;-)

Joachim


Am Freitag, 12. Januar 2018 19:25:30 UTC+1 schrieb alan.knight:
I don't think that's intended. When it says inconsistent values in field it means that two different sources have written different values to the same field in the same row. One useful way to debug this is to send debugWrite to the mapping. Then it will halt any time that mapping writes, and you should be able to see where the values are coming from in each case.

On Fri, Jan 12, 2018 at 1:24 AM jtuchel <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="crVGa7BnCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jtu...@...> wrote:
Sorry, the Exception says "Inconsistent values in field"  not row.
And it complains about the SORT attribute, which is not mapped to an inst var, just derived from the position in the Collection.

Here is what my mapping looks like:

    (aDescriptor newMapping: OneToManyMapping)
        attributeName: #feldMappings;
        referenceClass: BankAuszugCSVFeldMapping;
        orderBy: [:ea | (ea getTable: 'AUSZUG_CSV_FELD') getField: 'SORT'];
        beExclusive;
        writeTheOrderField

And the exception is thrown in FieldValueWrapper>>#contents:

Any thoughts?

Joachim




Am Freitag, 12. Januar 2018 10:20:31 UTC+1 schrieb jtuchel:
Hi,

it seems like RelationshipMappings that #writeTheOrderField cannot be updated. Every time the order of the objects in that 1:n relationship changes, I get a GlorpWriteExceptioon with 'Inconstent values in Row'.

Is that intended behavior?

Joachim



--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="crVGa7BnCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">glorp-group...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="crVGa7BnCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">glorp...@....
Visit this group at <a href="https://groups.google.com/group/glorp-group" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/glorp-group&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/glorp-group&#39;;return true;">https://groups.google.com/group/glorp-group.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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.