thanks can2nac, I tried it and it seems to work okay while using mock 
database. I'm not sure if it was behind all the problems I was having when 
I tried to change to Mnesia. It didn't seem to be a problem with Mongodb 
for me either.

I cast the fields to string using '::string()' in the model definition for 
vote, and then the empty field I defined using "" it it wasn't the same 
type via the little function:

optional_belongs(DataId, Type) ->
    case head(string:tokens(DataId, "-")) =:= Type of
        true ->
            DataId;
        false ->
            ""  
    end.

head([H|_]) -> H. 



-- 
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/cb69dfd5-b578-4253-9353-003275eb3938%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to