Hi Hans, I saw your message. Sorry didn't have time to try out the mapping yet.
Andrus On May 17, 2011, at 11:17 AM, Hans C. Poo wrote: > Andrus, > > ¿ Did you found something strange in the map ? or ¿ do you have any working > sample that i can adapt ? > > Thank you > Hans > > Hans Poo, Welinux S.A. > Bombero Ossa #1010, oficina 800, > +56-2-3729770, Movil: +56-9-3199305 > Santiago, Chile > > > ----- Mensaje original ----- > De: "Andrus Adamchik" <and...@objectstyle.org> > Para: user@cayenne.apache.org > Enviados: Viernes, 13 de Mayo 2011 6:51:55 > Asunto: Re: Help or sample on vertical inheritance > > Could you please post mapping XML? There were a few snags with vertical > inheritance. Could be one of them. > > Andrus > > On May 12, 2011, at 8:10 PM, Hans C. Poo wrote: > >> Hi, >> >> I'm using stable cayenne 3.0.1. >> >> Following the tutorial in vertical inheritance i've been unable to make >> vertical inheritance work. >> >> I've modified the tutorial app adding a Programmar as Child of Artist. >> >> It have the following error: >> >> Exception in thread "main" >> org.apache.cayenne.validation.ValidationException: [v.3.0.1 Sep 06 2010 >> 15:09:38] Validation failures: Validation failure for >> org.apache.cayenne.tutorial.persistent.Programmer.artist: "artist" is >> required. >> Validation failure for >> org.apache.cayenne.tutorial.persistent.Programmer.artist: "artist" is >> required. >> at >> org.apache.cayenne.access.ObjectStoreGraphDiff.validateAndCheckNoop(ObjectStoreGraphDiff.java:111) >> at >> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1095) >> at >> org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1045) >> at org.apache.cayenne.tutorial.Main.main(Main.java:48) >> >> The code for creating a new Programmer in main is: >> >> Programmer picasso = context.newObject(Programmer.class); >> picasso.setTipo("P"); // Discriminator added in Artist >> picasso.setName("Pablo Picasso"); >> picasso.setDateOfBirthString("18811025"); >> >> Any help will be appreciated. >> Bye >> >> Hans Poo, Welinux S.A. >> Bombero Ossa #1010, oficina 526, >> +56-2-3729770, Movil: +56-9-3199305 >> Santiago, Chile >> >> >> > >