HI again,
I've been using Glorp quiet happily for a few months, you can see that in the frequency of posts to this forum ;-)
But now I have a question.
I am using an EmbeddedValueOneToOneMapping to map two date columns to a TimeSpan- or Period-kind of Class (Zeitraum in German), which has a startDate and an endDate.
Here is an exaple mapping:
(aDescriptor newMapping: EmbeddedValueOneToOneMapping)
attributeName: #membershipPeriod;
fieldTranslation: (
(Join new)
addSource: (table fieldNamed: 'membership_start')
target: ((self tableNamed: 'ZEITRAUM_EMBEDDED') fieldNamed: 'startDate');
addSource: (table fieldNamed: 'membership_end')
target: ((self tableNamed: 'ZEITRAUM_EMBEDDED') fieldNamed: 'endDate');
yourself).
This works great - until today. It seems I always only hat timespans that at least have a startDate. But now I need to use it for a table/class in which both start and end date can be NULL. In that case, I'd like to habe a #membershipPeriod of nil rather than a Period with both dates being nil.
I am sure there is some way to tell this embedded mapping to check such situations. I tried beOuterJoin, but that didn't help.
I hope I've explained my use case well and somebody here can help me
Joachim