Hmm.. IIRC there was a bug in 3.1 that would ignore bound SchemaUpdateStrategy. 
Don't remember the details, but it messed up my tests before.

Andrus

> On Sep 14, 2015, at 3:43 PM, Michael Gentry <mgen...@masslight.net> wrote:
> 
> I haven't watched GoT yet, so no spoilers!  :-)
> 
> Around 7:30 you make it look like you can't do something without messing
> with XML in 3.1, but in fact, I did:
> 
>    /**
> 
>     * Sets up JNDI, Cayenne, Database, and Tapestry Registry for all tests.
> 
>     */
> 
>    @BeforeClass
> 
>    public static void setUpAllTests() throws NamingException
> 
>    {
> 
>        ...
> 
>        // Use a custom Cayenne server runtime.
> 
>        CayenneUtils.setCayenneRuntime(new ServerRuntime(Analytic.MODEL_NAME,
> new CayenneExtrasModule()));
> 
>        ...
> 
>    }
> 
> 
>    /**
> 
>     * Custom Cayenne DI module.
> 
>     */
> 
>    private static class CayenneExtrasModule implements Module
> 
>    {
> 
>        @Override
> 
>        public void configure(Binder binder)
> 
>        {
> 
>            // Change the SchemaUpdateStrategy to create the DB schema for
> unit
> 
>            // testing instead of using the model's default which assumes an
> 
>            // existing schema.
> 
>            binder.bind(SchemaUpdateStrategy.class
> ).to(CreateIfNoSchemaStrategy.class);
> 
>        }
> 
>    }
> 
> Still watching the rest, but +1 for adding it to the site!
> 
> Thanks,
> 
> mrg
> 
> 
> 
> On Sun, Sep 13, 2015 at 3:12 PM, Andrus Adamchik <and...@objectstyle.org>
> wrote:
> 
>> https://www.youtube.com/watch?v=gSauEmPnkCU
>> 
>> I just uploaded to YouTube a video with my talk about new features in
>> Cayenne 4.0. This was given at WOWODC in April. It is not as exciting as
>> Game of Thrones :) , but what's the community opinion on embedding it on
>> our home page?
>> 
>> Andrus

Reply via email to