Skip to content

NH-3229 - Schema Action "None" not respected for Many-To-Many relationships #1132

Open
@nhibernate-bot

Description

@nhibernate-bot

Carl Bussema created an issue — 26th July 2012, 17:58:18:

Create two entities, Foo and Bar, with a many-to-many relationship between them. Set the Schema action for each to "None". Create a third entity, Baz, with no relationship to Foo and Bar. Now export the Schema. No table for Foo or Bar will be created, but the Baz table will be created and so will the relationship table specified in your mapping for Foo-Bar N:M.

While this bug persists, it can be difficult to validate a database schema, or if there is legacy data in Foo and Bar that you want to map but your database user has sufficient permissions to drop and create tables in the database, you could accidentally drop the relationship table if you use ExportSchema to automatically generate the schema.

I have seen this error occur with .NET 4 and MS SQL 2005 and the Oracle 10g Dialect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions