Back to Devexpress

SameTableNameException Class

xpo-devexpress-dot-xpo-dot-exceptions.md

latest1.7 KB
Original Source

SameTableNameException Class

An exception that is thrown when two persistent classes are mapped to the same table.

Namespace : DevExpress.Xpo.Exceptions

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public class SameTableNameException :
    Exception
vb
Public Class SameTableNameException
    Inherits Exception

Remarks

A persistent class can be mapped to a specific table in a data store via the PersistentAttribute attribute. This exception is thrown if two classes exist that are mapped to the same table.

Solution:

  • map different classes to different tables.

A persistent class, that is a descendant of another persistent class, can be mapped to the table to which its ancestor is mapped using the MapInheritanceAttribute attribute.

Inheritance

Object Exception SameTableNameException

See Also

SameTableNameException Members

PersistentAttribute

MapInheritanceAttribute

DevExpress.Xpo.Exceptions Namespace