Fork me on GitHub
#datomic
<
2015-12-04
>
robert-stuttaford06:12:58

you could get a ref to the parent entity and walk its collection(s), or if you want what was just added, you’d use the tempid thing again

jonas18:12:11

Does the tx-report-queue tx-data not contain the fifth datom element (added?). It’s not mentioned in the docs http://docs.datomic.com/clojure/#datomic.api/tx-report-queue

marshall18:12:21

@jonas: The :tx-data entry does contain full E/A/V/T/Op datoms. I will suggest that be clarified in the doc.

genRaiy21:12:18

@robert-stuttaford: i want to be able to remove all component IDs in one go … for the moment I have to go through them one by one

genRaiy21:12:41

I should clarify … I am using a component ref for items in a shopping basket

genRaiy21:12:56

which seems like a logical way to use that feature

genRaiy21:12:12

but now I have to do a lot of book-keeping around the elements that are added / updated deleted rather than just sending the map back into datomic and let it handle the book-keeping

genRaiy21:12:17

does that make sense?

tcrayford22:12:27

@raymcdermott: seems like it'd be easy enough to write a transaction function for that.

genRaiy22:12:30

@tcrayford: that sounds tempting … what would I win?

tcrayford22:12:58

atomicity for one

genRaiy23:12:32

Yes, makes sense but it still feels like I’m moving boiler plate from one place to another

tcrayford23:12:43

ah, but the transaction function could be very generic, it doesn't need to be tied to your application at all (which is a pattern I'd generally recommend for transaction functions)

tcrayford23:12:53

like :db.fn/replaceSubComponents or something

genRaiy23:12:39

hmmm - yes …. I was hoping that would be in Datomic 😉

genRaiy23:12:52

but nice idea … I’ll give it a crack

genRaiy23:12:21

I’m working on an example for the Heroku Datomic thing so it could be good to show that feature

tcrayford23:12:02

@raymcdermott: I've only written 3 transaction functions in 3 years of using datomic, all of them super generic, which I like a lot.

genRaiy23:12:01

@tcrayford: I’ll shoot you a link to the code for your comments once it’s done (should be able to finish the Datomic parts over the weekend)

genRaiy23:12:18

then om.next!