For example, i have such data from webform:
Timetables=[[{"date","20.01.2014"},{"in_out","is"},{"type","d"}],[{"dow",[0,"mo","tu","we"]},{"in_out","is"},{"type","dow"}]]
Layers=[[{"id","layer-52e02141421aa9144e000001"},{"in_out","in"}]]
Actions=[[{"value","00"},{"type","sms"}],[{"value","00989"},{"type","sms"}]]
And model :
-module(monitor,[Id, AccountId, KidId, Name, Layers, Timetables, Actions,
CreateDate, Status]).
How i can to save Layers if field Layers ?
I try to use bson,bjson,jiffy to encode json, but got errors or binary in
field,,,,
but after creating model i want to search some like
db.monitors.find(layers.id=....)
How to do this ?
понедельник, 27 января 2014 г., 22:59:42 UTC+4 пользователь Дмитрий Тютерев
написал:
>
> Good day to all .
>
> I decide to use mongodb in my project and have some trouble now.
> I want to save bson structure in boss module field like :
>
> Structure=[[{a:1},{b:2}],[{a:3},{b:4}]],
> some_model:new(id,Structure),
>
> But got problem with list_to_binary function.
>
> Can you help me to solve this. I think to solve this with using some like:
>
> boss_db:transaction(
> some_model:new(id,field),
> mongo:query:insert ... etc.
> )
> but can't find any examle.
>
> )
>
> Sorry for my English )
>
>
>
--
You received this message because you are subscribed to the Google Groups
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit
https://groups.google.com/d/msgid/chicagoboss/9ea16e2f-cce8-41bd-8aeb-93719a75b393%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.