holy_sin
V2EX  ›  问与答

Core Data 多个 managed object model

  •  
  •   holy_sin · Sep 23, 2015 · 2557 views
    This topic created in 3888 days ago, the information mentioned may be changed or developed.
    背景:
    做多用户的 app ,如果把所有的 entity 都放在一个 MOM ( managed object model )里面,每个 entity 都要记录一个 ownerid 来区分不同用户的数据。

    我的想法是,有一个 MOM 是单独统计账号数据的,比如 userid , username 。再来一个 MOM 来记录用户下的数据,比如用户的聊天信息,用户和他人的关系,用户喜欢的内容。再切换用户的时候切换数据库

    有同僚之前这么处理过吗?
    1 replies    2015-09-23 17:05:03 +08:00
    ipconfiger
        1
    ipconfiger  
       Sep 23, 2015
    貌似可以这么干
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3050 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:54 · PVG 16:54 · LAX 01:54 · JFK 04:54
    ♥ Do have faith in what you're doing.