db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject Re: Torque 4 next steps
Date Thu, 19 May 2011 19:39:18 GMT
> > On 09.05.11 22:02, Thomas Fox wrote:
> > > - remove remnants from village usage from om classes
> > > This would mean removing  the getOMClass() method, the CLASS_DEFAULT
> > > constant and the initClass() method in the generated peers. They were
> > > needed to create instances of the database object classes but this is
> not
> > > necessary any more with the mapper classes. Any objections here ?
> >
> > Sorry for not replying earlier, but yes. The getOMClass() method is
> > for the inheritance feature of Torque which I happen to use. How would
> > that work with the mapper classes?
> The idea is that the record mapper class looks into the inheritance key
> column and knows the mapping from keys to classes to instantiate.
> But looking at the generated code (
> org.apache.torque.test.BaseInheritanceClassnameTestRecordMapper in the
> project), it seems that the mapping feature is currently not working, No
> mapping takes place but the inheritance key column is taken to contain
> om class name directly.
> Obviously, also a test case is missing because junit tests are green at
> moment.
> I'll look into it.

I was mistaken. The inheritance with keys works, and a test case exists in
the test project. I looked at the wrong class (should have looked at
org.apache.torque.test.BaseInheritanceTestRecordMapper instead).
Inheritance with classname can be improved to work out of the box, I'll do
that and add a test case.


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message