How do you feel about having a findReferencing method in SRecordInstance, just like the existing findReference there? That'd make it just as easy to lazily...
A good question, and the answer is no. Suppose one performed a query to select Employees in Sales where Salary > 100000 order by Name What would you expect...
berglas@...
Jul 7, 2009 12:45 am
1778
OK. Should we then widen the SSessionI interface? It's nice to be able to write fully testable code that doesn't depend on the concrete SSessionJdbc. But you...
I haven't bothered putting abstract classes on things like SSessionJdbc because I'm not sure that it is useful. Mocking out the database essentially mocks out...
berglas@...
Jul 7, 2009 6:08 am
1780
Hello to you all. Just wanted to find out whether it is possible to work with more than one data source with simple-orm and if so hwo it can be done....
Yes, easy. It is just an initial parameter when opening a connection. Can swap connections too, see LongTransactionTest. Anthony ... Spreadsheet Detective, ...
berglas@...
Jul 25, 2009 4:22 am
1782
Hi Anthony, it's been a long time since I said I would rename SAggregateQuery to SQuerySelect, as soon as... well. I'm ready now :) I just come back to make...
Hello Franck, Good to hear that you are back on this. Producing a new release is way over due. I have also been busy. The reasoning is that aggregates is...
Hi, there is a point I don't get... there are big differences between SRecordGeneric and SRecordInstance, that make me think it would be hard to unify them: ...
Hello Franck, Yes, I was thinking along similar lines after I posted. The primary key is the big issue. (And having multiple queries with different select...
berglas@...
Jul 30, 2009 10:58 am
1786
Hello, so, I would go: SRecordGeneric as the base abstract class SRecordInstance... SRecordTransient for what is called SRecordGeneric now... I would also...
Hello Franck, Sounds good. I would like the copied code pushed up into SRecordGeneric as private methods. Pushing getString(String) up as abstracts should also...
Hello Anthony, I finally commited my changes right now. So, I created a new SRecordGeneric, an abstract class that implements Map and has all the code related...
On a second thought, it seemed much cleaner to throw UnsupportedOperationException on remove(), just like for clear(), and this is allowed by the spec. So I...
Hello Franck, You have been busy. You even implemented EntrySet for the Map, which I was not suggesting but it is good. Should have a comment that it is...
Hi, ... I added a comment. ... You are right. Moreover, the Map interface allows this behaviour (optionnal). I wanted to stick to the interface for cases like...
Hello Franck, Thanks for polishing the SRecord get* methods. Probably negligible speed difference for most applications, but best not to ignore efficiency. ...
... One more thought, what happens if someone does a get("xxx") where xxx is not a field in an SRecord, or is a field but is not valid? Probably should throw...
Hello Anthony, one way to make entrySet(), containsKey(), etc. more efficient and clean would be to create an entrySet for each record instance, and add an ...
Hi Anthony, I couldn't help but commit a new feature whose intent is to allow to recover a dataset after a rollback, without the cost of the clone() solution. ...
Hello Franck, Your backing set fix is not quite right. It only backs the entries, not the Set. So if an !isValid entry is put it will not appear. I have...
berglas@...
Aug 4, 2009 9:49 am
1798
You are right. Don't do it. Very hard to keep in sync. Looking for bugs. But containsKey does not need an entrySet at all -- have a look. ... Spreadsheet...
berglas@...
Aug 4, 2009 9:50 am
1799
Hello Franck, Yipes. Is this something that you really needed? I'm guessing as a way to recover from broken optimistic locking. But that would not work --...
berglas@...
Aug 4, 2009 10:05 am
1800
Hello Anthony, it is indeed something we need... The use case is the following: 1) the user creates a dataSet and some records in the UI layer. 2) the dataSet...
Hello Franck, Flush failing is not the same as a rollback. But I do see your point. Continuing on would be very hard, some dirty bits cleared, others not...
berglas@...
Aug 5, 2009 4:06 am
1802
Le mercredi 05 août 2009 à 14:05 +1000, berglas@... ... Right, but most of the time, when flush fails, I will rollback, as I don't have...
Hello Franck, OK, I now see what you mean about clone() and serializable. But I do not see why clone is inherently less inefficient than what you have done....
Hello Anthony, I think you are mostly right. The only reason I made savepoint was to have a more fine grained behaviour, allowing th "clone" only the records ...
Hello Franck, It would be good to do some benchmarks. And it is probably fairly easy for you -- just call the clone method redundantly and notice the...