Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alex Weber
    @alexweber
    just my 2 cents, i find the circularish dependency between collections and models somewhat awkward
    shouldnt the table definition belong to the model?
    and a collection be returned by find* methods?
    meh, terminology i guess, ive been using persistence.js a lot lately so that threw off my terminology
    anyway appreciate it man, heading out ill be lurking here from time to time :)
    good work! :clap:
    Fahad Ibnay Heylaal
    @fahad19
    I try to keep each class as small as possible. so Collection works as finder, and Model always does stuff with one single record only. but they both have info, that the other might require.
    thats why collection.modelClass can either be a class directly, or a function that returns the class. my cheap way of getting around the circular dependency.
    Alex Weber
    @alexweber
    hehe yeah i figured, i get it, you totally sold on that or open to change down the road?
    Fahad Ibnay Heylaal
    @fahad19
    API is unlikely to change. but I can't deny another project that can work as a class registry for firenze. think Angular's dependency injection.
    Alex Weber
    @alexweber
    gotcha
    yeah having some kinda DI container would make things a lot smoother/more intuitive
    anyway gotta go, thx again for the help
    Fahad Ibnay Heylaal
    @fahad19
    well, firenze.js was born keeping a backend framework in mind. so DI can be a possibility in the future.
    but for now, the library will stay as lean as possible.
    Alex Weber
    @alexweber
    @fahad19 hey man
    i've been working on implementing Collection.deleteMultiple()
    hitting a wall on a strange weird issue getting the tests to work
    i had to implement dropTable() for the test memory adapter
    but for whatever reason this.postsDatais always missing the first post after the delete test
    i changed the tests to bootstrap on beforeEach() to circumvent this, but something's not quite working
    i implemented the missing "delete a single model test" as well, that's the one that's causing trouble apparently
    would really appreciate it if you could take a few to check it out and help me figure it out
    thanks!
    Fahad Ibnay Heylaal
    @fahad19
    @alexweber: any reason you aren't doing async.eachSeries()?
    Alex Weber
    @alexweber
    @fahad19 Yeah: I didn't know about it :)
    Either way, doesn't change that weird testing behavior eh, I'd expect it to re-create all 3 test posts after the delete a single model test, however it's only got 2 models at the start of the 3rd test
    Fahad Ibnay Heylaal
    @fahad19
    take a look at model.loadAllFixtures. it has a nice usecase for promised async workflow.
    async workflow that includes processing multiple resultsets
    Alex Weber
    @alexweber
    will do, thx for the reference
    any comment on the delete test by any chance? :)
    Fahad Ibnay Heylaal
    @fahad19
    cant check now. busy with work :)
    Alex Weber
    @alexweber
    np, please do when you get a chance, it's really blocking me.... thx!
    Alex Weber
    @alexweber
    @fahad19 :(
    Fahad Ibnay Heylaal
    @fahad19
    @alexweber: moving to a new place this week. insanely busy times :-/
    Fahad Ibnay Heylaal
    @fahad19
    @alexweber: which delete test specifically?
    Fahad Ibnay Heylaal
    @fahad19
    @alexweber: first thing I noticed is missing semicolons. I would suggesting running npm run lint on the code base first.
    core has been updated lately with MemoryAdapter as the test adapter. please try running against latest master.
    Fahad Ibnay Heylaal
    @fahad19
    @alexweber: been thinking a lot about avoiding the Collection ==> Model ==> Collection references. simplifying it in 0.2.x: https://github.com/fahad19/firenze/tree/0.2.x#quickstart
    Aram Bayadyan
    @aramix
    hi there
    anyone up?
    Fahad Ibnay Heylaal
    @fahad19
    @aramix: yep
    Aram Bayadyan
    @aramix
    solved my problem (though to be hones I don't really remeber what was the problem)
    :P
    Fahad Ibnay Heylaal
    @fahad19
    @aramix :+1: