[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nrdo-list] foreign key reference error
From: |
Michael Hitchcock |
Subject: |
[nrdo-list] foreign key reference error |
Date: |
Tue, 28 Mar 2006 14:28:48 -0600 |
Stuart,
I downloaded latest version of NRDO for .NET 2.0 enhancements, using the
Generic NRDO library and a basic dfn file of:
table employee{
description [a municipal employee of Ankh-Morpork.];
longdesc [
];
fields {
int id int notnull readonly [the ID number of the person];
string last_name varchar(50) notnull readwrite [the person's last name];
string first_name varchar(50) notnull readwrite [the person's first
name];
int boss_id int nullable readwrite [the ID of the person record of this
person's boss];
};
pkey sequenced id;
get multi {fields {last_name}; orderby {first_name}};
get single {fields {first_name; last_name}; called name};
get multi {called all};
# We want to create a foreign key constraint on boss_id, and also support
a
# getBoss() method on the object.
references single user {fkey; by {boss_id id}; called boss};
# For a given boss, we might also want to be able to get a list of
employees.
#references multi user {by {id boss_id}; called subordinates};
# In order to support the above "subordinates" references, we need a "get
by
# boss id" for the references to link to.
#get multi {fields {boss_id}};
};
If the foreign key reference on boss_id is commented out, all works fine.
But with the refernece,
when I build the generated code I get:
C:\Projects\WebSite1\App_Code\Employee.cs(585,18): error CS0309: The type
'int?' must be convertible to 'System.IComparable<int?>' in order to use it
as parameter 'TField' in the generic type or method
'NR.nrdo.NRDOComparer<TClass>.Create<TField>(NR.nrdo.Func<TClass,TField>)'
Any suggestions?
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
- [nrdo-list] foreign key reference error,
Michael Hitchcock <=