These are chat archives for canjs/canjs

23rd
Aug 2017
kostya.aderiho
@kaderiho
Aug 23 2017 19:37

Hi all, I have the next DefineMap instance:

const Attachment = DefineMap.extend({
    attachmentTO: {
        attachmentType: 'string',
        resourceType: 'string',
        contentType: 'string',
        entityType: 'string',
        entityId: 'string',
        fileSize: 'number',
        urlName: 'string',
        clientId: 'number',
        status: 'string',
        id: 'string'
    },
    downloadUrl: null,
    uploadUrl: null
});

and I need to set id in Algebra something like this:

const attachmentsAlgebra = new set.Algebra(
    set.props.id('attachmentTo.id')
);

but it doesn't work, could someone help how I have to set id in Algebra?

Nico R.
@nriesco
Aug 23 2017 19:45
@kaderiho I don't know much about algebra but first check the case of attachmentTO (the last letter)
kostya.aderiho
@kaderiho
Aug 23 2017 19:46
:)
I should be TO of course, fixed for not confusing
Kevin Phillips
@phillipskevin
Aug 23 2017 19:48
if that did not solve your problem, please open an issue
kostya.aderiho
@kaderiho
Aug 23 2017 19:48
but with TO doesn't work so far :(
Kevin Phillips
@phillipskevin
Aug 23 2017 19:49
I'm not sure if using nested properties is supported
so we may need to add this as an enhancement
kostya.aderiho
@kaderiho
Aug 23 2017 19:50
could you please say where I can write about this issue?
Kevin Phillips
@phillipskevin
Aug 23 2017 19:50
kostya.aderiho
@kaderiho
Aug 23 2017 19:50
I mean for guys who work on canjs
okey, many thanks