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. |
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:
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. |
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:
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. |
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:
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. |
Free forum by Nabble | Edit this page |