arm, yes, sequelize implements an Active Record pattern, which is different 
from DAO. Active Record don't load relatiosn by default, but offers you 
methods to load them if you want. So Group.find().members.find() creates 2 
sql fetches. DAO- friendly ORMs like Hibernate works with lazy-loading 
proxy here. In Document-DB's like Mongo you have 2 options: denormalize 
(the the all is loaded and is may be redundant) or normalize and join on 
application level.

Am Freitag, 2. August 2013 19:19:02 UTC+2 schrieb Chris Platts:
>
>
> On Friday, 2 August 2013 08:28:30 UTC+1, greelgorke wrote: 
>>
>> for a beginning it could do. here my opinions (without really seen 
>> anything): 
>>  
>>
> <snip>
>  
> Excellent -- thank you very much for your reply!
>  
> So essentially, I should be replicating exactly what I'd do in the 
> languages I'm used to (C#, etc) -- A service layer handling requests, a 
> business layer and a 'DataAccessObjects' layer.
>  
> Thanks in particular for your third point -- I really like the idea of the 
> data objects being streams which can be fed through the business layer and 
> straight through to the response.
>  
> Now, the last real ''huh?' point I've got is how to handle object (table) 
> relationships so I can return nested JSON containing related objects to the 
> API consumer.  It seems that if I were using a NoSQL database, I'd have no 
> problems at all.  But since I'm tied to MS SQL, my options seem rather 
> limited ORM-wise.  I suppose I could construct the model object graph 
> manually when querying the data source, but that seems painful!  Anyway, 
> that's probably not a question for here -- I'll go hang around the 
> sequelize forums :)
>  
> Thanks again for your help,
>  
> Regards,
> Chris
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to