Re: Mananged many-to-one references
Mike Goodwin <[email protected]> Thu, 15 Apr 2010 02:07:15 +0100
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <[email protected]> |
Hi Franck, Anthony Thanks for the responses, I think I understand the required approach now. My initial impression is that SimpleORM is essentially correct. It feels intrusive and a bit more verbose, but they are both good things, because it forces persistent considerations to be handled, and everything is explicit and understandable. Conversely hibernate ...etc. have perhaps gone to far trying to eliminate all verbosity and intrusion and in doing so have created a lot of edge cases and gotchas. Still, I think the main issue I have is that the because the SDataSet is constructed procedurely it can become hard to know exactly what it contains at different points in a program. I accept that the many-to-one does not require managing especially from a data management point of view, but I still think it can be useful for describing the data being managed. In a sense the way it is now, the records in an SDataSet are implicit on the preceding logic. In other words it might be nice if data sets could be done in a more declarative manner, perhaps this could be based ontop of the SDataSet as it is currently. In this scheme there would need to be a way to declare a many-to-one in an entity. For data sets with more than a single root piece of data, probably another umbrella type would be necessary, with it's own meta data. Many-to-one data items could be declared with a filter/query, but by default you would get all. Loading a dataset would then become a single step (it would resolve all references and fetch, by default). Added data would have to belong within the declared hierarchy. Queries should be performable against a dataset or against the database. Just my ideas, possibly a bit premature, regards, mike