I think I'll need to look at your code to help, however I don't have my laptop with me for the next few days. I'll get back to you in a day or two.
Dan On 10 Feb 2013 10:39, "Christian Steinebach" < [email protected]> wrote: > Hi everybody! > > I'm working on a similar demo as DDDsample (didn't know about it until you > started the discussion) > I have a service installed which should produces a list of alternative > transportation paths from a pickup > to a delivery destination. One of the alternatives should be selected by > the user. > The chosen TransportationPath should then be added to a TransportDemand. > > class TransportPath[{ > List<ShortLeg> getLegs(); > ... > } > //for simplicity only to and from > class ShortLeg{ > public String getFrom(); > public String getTo(); > } > > The ShortestPathService seems to work ok while generating > TransportPaths with increasing 'costs'. When 'leaving' the service all > legs are instantiated. > Nothing needs to be persisted until the user has chosen an alternative. > > Now the questions: > > 1) While generating the paths I've used createTransientInstance() with > persist and without persist afterwords. > I've use new ...() as well to allocate both new paths and new ShortLegs. > > Whenever the transport paths end up in a table, the legs are gone, the > list is empty. > I've build up the title on the fly to check that the legs are originally > added tot the transport path. > And the title is reflecting all legs correctly, but still the added legs > are gone. > When clicking on one alternative, the viewer crashes. > > What am I doing wrong here? What would be the correct way of presenting > unpersisted > alternatives to a user where he can select the one. > > 2) Even when having a list of transport paths (althouhg only titles) where > should I annotate with > @Bulk to make it happen? I've tried several places (TransportDemand, > TransportDemands) > but to no success. Or isn't Bulk the right way to do it? > > I'm getting more and more confused and am obviously missing something > important here. > > I've put the source on GitHub > https://github.com/chris58/TPM.git > > Any help very much appriciated > Christian > > > I've tried the onaboat project to get some ideas, but when clicking on an > 'Undefined Schedule' in Voyage > it crashes too. :-( > > > > >
