Hi Oscar,
That is nice to know, but I'm looking more for a direct sql lookup of a given
entity. I don't want to have to pull the list of all objects from my database
and iterate through them, since that will be much slower than a simple sql
statement with a where clause. I can't just do it with a prepared statement
since I will be searching on an arbitrary number of fields. I could just
compose a sql statement myself directly, but I'd prefer to use the JDO
framework and am wondering how to best access it through the isis utilities
(I'm guessing the DomainObjectContainer?)
thanks,
Jeremy
> Hi, Jeremy.
>
> In my case, the equivalent code in my domain would be:
>
> @Then("^.*the \"([^\"]*)\" risk register's risks collection should
> contain:$")
> public void
> then_riskregisters_risks_collection_should_contain(@Transform(RiskSpecTransformer.RiskRegister.class)
> final RiskRegister riskRegister, final List<RiskDesc> listOfExpecteds)
> throws Throwable {
>
> this.nextTransaction();
>
> final SortedSet<Risk> risks = riskRegister.getRisks();
> final ArrayList<Risk> risksList = Lists.newArrayList(risks);
> assertTableEquals(listOfExpecteds, risksList);
>
> }
>
>
> Where the "assertTableEquals(xxx)" method is implemented on the
> "CukeGlueAbstract" class and compares by name each field on the spec, with
> the proper one on the class. Is this what you want to achieve?
>
>
> Regards,
>
> Oscar
>