Where has the cascadeStyle gone?

1 view
Skip to first unread message

Thomas Koch

unread,
Feb 6, 2009, 7:20:07 AM2/6/09
to nhusers
Hi - I just noticed that the definition for the "cascadeStyle" was
removed from the nhibernate-mapping.xsd file in the NHibernate 2.0,
compared to NHibernate 1.2.

The result is that Visual Studio is unable to offer any intellisense
for the cascade property in the xml mapping files.

Does anyone know, why this change was made?

Cheers,
Thomas

Fabio Maulo

unread,
Feb 6, 2009, 7:29:16 AM2/6/09
to nhu...@googlegroups.com
2009/2/6 Thomas Koch <fid...@gmail.com>


Does anyone know, why this change was made?

cascade="save-update, refresh, delete-orphan"

--
Fabio Maulo

Gustavo Ringel

unread,
Feb 6, 2009, 7:38:33 AM2/6/09
to nhu...@googlegroups.com
all and all-delete-orphan are not current? I'm almost sure i tried all with the trunk and it's working ok.

Gustavo.

James Gregory

unread,
Feb 6, 2009, 7:49:13 AM2/6/09
to nhu...@googlegroups.com
I think Fabio is saying cascade is now comma separated, which isn't representable in a schema.  I could be wrong though, I'm not on trunk myself.

Gustavo Ringel

unread,
Feb 6, 2009, 7:51:27 AM2/6/09
to nhu...@googlegroups.com
that makes sense

Fabio Maulo

unread,
Feb 6, 2009, 7:53:03 AM2/6/09
to nhu...@googlegroups.com
2009/2/6 Gustavo Ringel <gustavo...@gmail.com>

all and all-delete-orphan are not current? I'm almost sure i tried all with the trunk and it's working ok.

Sure Gustavo.
My post was only an example of the new way to define cascade-style in the mapping.
Starting from NH2.0 the cascade-style may have more than one value (combination of single values) so it is impossible to have a enumerator in the XSD.
All available styles are:
"all", "all-delete-orphan","save-update","persist","merge","lock","refresh","replicate","evict","delete","remove","delete-orphan"

--
Fabio Maulo

Thomas Koch

unread,
Feb 6, 2009, 7:53:46 AM2/6/09
to nhusers
Hi - thanks for the answers, but I am not sure that you understood
me. :-)

When I look into the nhibernate-mapping.xsd the "cascade" attribute
has its type set to string.
Comparing nhibernate-mapping.xsd from NHibernate 2.0 with the same
mapping file for NHibernate 1.2 I can see that the difference is that
the old mapping file has the "cascade" attribute mapped to type
"cascadeStyle", which is an enumeration of the allowed values.

With the cascadeStyle being removed from nhibernate-mapping.xsd in NH
2.0, Visual Studio cannot offer any intellisense. Instead I have to
write the allowed values manually.

Cheers,
Thomas





On 6 Feb., 13:38, Gustavo Ringel <gustavo.rin...@gmail.com> wrote:
> all and all-delete-orphan are not current? I'm almost sure i tried all with
> the trunk and it's working ok.
>
> Gustavo.
>
>
>
> On Fri, Feb 6, 2009 at 2:29 PM, Fabio Maulo <fabioma...@gmail.com> wrote:
> > 2009/2/6 Thomas Koch <fidu...@gmail.com>
>
> >> Does anyone know, why this change was made?
>
> > cascade="save-update, refresh, delete-orphan"
>
> > --
> > Fabio Maulo- Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -

Fabio Maulo

unread,
Feb 6, 2009, 7:54:30 AM2/6/09
to nhu...@googlegroups.com
2009/2/6 James Gregory <jagregory.com@gmail.com>
I think Fabio is saying cascade is now comma separated, which isn't representable in a schema.  I could be wrong though, I'm not on trunk myself.

That feature is available since NH2.0.0
The last available release is NH2.0.1
The actual trunk is NH2.1.0

--
Fabio Maulo

Thomas Koch

unread,
Feb 6, 2009, 7:54:55 AM2/6/09
to nhusers
Ah - that would explain it. :-)

Thanks.

Thomas

On 6 Feb., 13:49, James Gregory <jagregory....@gmail.com> wrote:
> I think Fabio is saying cascade is now comma separated, which
> isn't representable in a schema.  I could be wrong though, I'm not on trunk
> myself.
>
> On Fri, Feb 6, 2009 at 12:38 PM, Gustavo Ringel <gustavo.rin...@gmail.com>wrote:
>
>
>
> > all and all-delete-orphan are not current? I'm almost sure i tried all with
> > the trunk and it's working ok.
>
> > Gustavo.
>
> > On Fri, Feb 6, 2009 at 2:29 PM, Fabio Maulo <fabioma...@gmail.com> wrote:
>
> >> 2009/2/6 Thomas Koch <fidu...@gmail.com>
>
> >>> Does anyone know, why this change was made?
>
> >> cascade="save-update, refresh, delete-orphan"
>
> >> --

Hielke Hoeve

unread,
Feb 7, 2009, 12:10:24 PM2/7/09
to nhusers
Wondering though why the options aren't made available through a
number of static strings so people don't have to search the internet
to find the options. :-)

Fabio Maulo

unread,
Feb 7, 2009, 12:27:28 PM2/7/09
to nhu...@googlegroups.com
We can add it as a comment to show it as tooltip in intellisense.

2009/2/7 Hielke Hoeve <hielke...@gmail.com>


Wondering though why the options aren't made available through a
number of static strings so people don't have to search the internet
to find the options. :-)




--
Fabio Maulo

Fabio Maulo

unread,
Feb 7, 2009, 1:01:46 PM2/7/09
to nhu...@googlegroups.com
2009/2/7 Fabio Maulo <fabio...@gmail.com>

We can add it as a comment to show it as tooltip in intellisense.

And some user can add it to the reference-wiki in NH-Forge
--
Fabio Maulo
Reply all
Reply to author
Forward
0 new messages