Loopback: How remove internal properties from list

40 views
Skip to first unread message

Steffen Lohbrandt

unread,
Sep 23, 2016, 4:29:26 AM9/23/16
to LoopbackJS

When i ask my db for a embedded Object i become a list. This list is to update. Loopback return a List like this:

List [
 { variable: 'string',
   relation: 'string',
   value: 'string',
   id: null } ] }

After manipulating this – add or remove – i will rewrite this via updateall to the database. now i have in the database the hiddenPropertys like this:

"__cachedRelations" : {
    "__data" : {
        "variable" : "d", 
        "relation" : "r", 
        "value" : "1"
    }, 
    "__dataSource" : null, 
    "__strict" : false, 
    "__persisted" : false, 
    "variable" : "d", 
    "relation" : "r", 
    "value" : "1", 
    "id" : null
}

How can i this disable or convert? Thanks a lot for solving this.

Mark Johnson

unread,
Sep 25, 2016, 7:21:06 PM9/25/16
to LoopbackJS
I think you may be looking for the embedsMany or referencesMany relations:

Steffen Lohbrandt

unread,
Sep 26, 2016, 2:54:31 AM9/26/16
to LoopbackJS
Hello Mark,

i have seen this page, but where is the part of List-Properties?

Mark Johnson

unread,
Sep 26, 2016, 11:07:15 PM9/26/16
to LoopbackJS
I'm not exactly sure about the question, but these allow you to treat the nested properties as relations, so POST/PUT/DELETE endpoints will update these lists accordingly.

Steffen Lohbrandt

unread,
Sep 28, 2016, 1:32:10 PM9/28/16
to loopb...@googlegroups.com
Hello,

you see my example? See you the Properties whit the underline?
How can i loose this?


Grüsse sendet
Steffen Lohbrandt


--
You received this message because you are subscribed to a topic in the Google Groups "LoopbackJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loopbackjs/P3YfjbkEHcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loopbackjs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/e0025a86-1bf2-4d98-82e4-4bab35dac9ea%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages