Hi Steve (and Oscar)

Just been playing around with this using the simpleapp.

What I've found is that by adding a file SimpleObject.jdo (in the
domainapp/dom/simple package, right alongside SimpleObject.java), with the
contents:


<?xml version="1.0" encoding="UTF-8" ?>
<jdo xmlns="http://xmlns.jcp.org/xml/ns/jdo/jdo";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/jdo
        http://xmlns.jcp.org/xml/ns/jdo/jdo_3_0.xsd";>

    <package name="domainapp.dom.simple">
        <class name="SimpleObject"
               schema="simpleXX">
        </class>
    </package>
</jdo>

then this was enough to change the schema.  (If you try to repeat this
test, note that the SimpleObjectTeardown fixture also needs to be changed
to reference the different schema).

When I went to download the JDO metadata before-and-after the change (on
the metadata panel), the only difference is this change in schema.

So, it looks like DataNucleus will merge any XML metadata with any
annotations (with the XML metadata taking preference).  In other words,
exactly what we want.  (Andy, if you pick this up, any
comments/corrections?)

Let me know if this works for you, too.

Thanks.
Dan





2016-08-22 15:13 GMT+01:00 Óscar Bou - GOVERTIS <[email protected]>:

> Hi Stephen,
>
> Found Dan’s comment on a issue on github which details how to override it
> with “package.jdo” in META-INF:
>
> https://github.com/isisaddons/isis-module-security/issues/35
>
>
> HTH,
>
> Oscar
>
>
> El 17 ago 2016, a las 4:24, Stephen Cameron <[email protected]>
> escribió:
>
> Hi,
>
> I am using the security module which defines a schema 'isissecurity', but
> in MySQL the security tables get created in the default schema. Everything
> works fine, but I still get an error message at startup which I'd like to
> get rid of.
>
> I'm pretty sure I've seen reference to a means to remap the schema name via
> a Datanucleus configuration (persistence.xml?), if someone could show me
> how this is done, or point me to relevant documentation that would be
> appreciated.
>
> Thanks
> Steve Cameron
>
>
>
> Óscar Bou Bou
> Socio - IT & GRC Management Services Director
> m: +34 620 267 520
> s:  <http://www.govertis.com>www.govertis.com e: [email protected]
>
> LinkedIn: https://www.linkedin.com/in/oscarbou
> Twitter:  @oscarbou <https://twitter.com/oscarbou>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
>
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad
> es la de mantener el contacto con Ud. Si quiere saber de qué información
> disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo
> enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a
> la siguiente dirección: GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes
> Valencianas, 58 – 8º - 6ª. 46015 - Valencia,  y Paseo de la Castellana,
> 153, 28045 - MADRID. Asimismo, es su responsabilidad comprobar que este
> mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso
> que los tuvieran eliminarlos.
>
>

Reply via email to