|
|
Hi, i got this problem
Given this class:
<Serializable()>
Public Class Grupo
Inherits Entity
Sub New()
End Sub
Sub New(ByVal codigo As String,
ByVal descripcion As String)
Me._codigo = codigo
Me._descripcion = descripcion
End Sub
<UniqueIndex()>
<NotNullable()>
Private _codigo As String
<StringLengthValidator(Min:=1)>
Public Property Codigo() As String
Get
Return _codigo
End Get
Set(ByVal value As String)
SetToStr(Of String)(_codigo, value, Function() Codigo)
End Set
End Property
Private _descripcion As String
<StringLengthValidator(Min:=1)>
Public Property Descripcion() As String
Get
Return _descripcion
End Get
Set(ByVal value As String)
[Set](Of String)(_descripcion, value, Function() Descripcion)
End Set
End Property
Private _subGrupo As MList(Of SubGrupo) = New MList(Of SubGrupo)
Public Property SubGrupo() As MList(Of SubGrupo)
Get
Return _subGrupo
End Get
Protected Friend Set(ByVal value As MList(Of SubGrupo))
[Set](Of MList(Of SubGrupo))(_subGrupo, value, Function() SubGrupo)
End Set
End Property End Class
And this initialization for SignumFramework
Dim sb = New SchemaBuilder
Dim dqm As New DynamicQueryManager
ConnectionScope.Default = New Connection(strConnection, sb.Schema, dqm)
If sb.NotDefined(MethodInfo.GetCurrentMethod) Then
sb.Include(Of Productos.Grupo)()
dqm(GetType(Productos.Grupo)) = (From q In Database.Query(Of Productos.Grupo)()
Select New With
{
q.Codigo
}
).ToDynamic()
End If
I got this Error: System.InvalidOperationException = {Entity column not found}
What i'm doing wrong? what left? thx for the help
|
|
Coordinator
Apr 2, 2012 at 11:19 AM
Edited Apr 2, 2012 at 11:19 AM
|
Hi Despota,
DQM require an column called 'Entity' on the definition. This column is invisible but is the one with the entity that will be opened when you double click.
Just write:
dqm(GetType(Productos.Grupo)) = (From q In Database.Query(Of Productos.Grupo)()
Select New With
{
Entity = q.ToLite(),
q.Codigo
}
).ToDynamic()
|
|
|
|
Thanks for the help. It works.
|
|