CSQLEditAttribute Error

3 views
Skip to first unread message

camer...@gmail.com

unread,
Dec 8, 2009, 1:20:47 PM12/8/09
to risee...@googlegroups.com
Hi there, I get the following error when generating code (TSQL). I removed the constraint on the 'Occupancy' and it reads 'None', however I still get this message.

---------------------------
Code generation failed
---------------------------
CSQLEditAttribute: Failed to generate constraint for column 'Occupancy'! Reason: Link: parser tree contains composed named 'Building.Capacity' not found in current context!
---------------------------
OK
---------------------------


HOlsen

unread,
Dec 9, 2009, 7:21:28 AM12/9/09
to RISE
Hi Cameron,
The problem is that the constraint is in the model evolution.

If you refactor your model, the problem will go away. However, if you
need to be able to update an existing system/database that is created
using this model, refactoring is not an option.

In this case you can always open the model, in for example notepad,
and remove your constraint from the evolution.
1. Make a back-up-copy of your model
2. Open the model in Notepad
3. Search for your constraint
4. You will find something like <rise:check>Building.Capacity &gt;
Occupancy</rise:check>
5. Change it to <rise:check></rise:check>
6. Save the model

You should now be able to generate code.



Best regards,
Håkan Olsen

Cam: @muunkky

unread,
Dec 9, 2009, 11:12:50 AM12/9/09
to RISE
Great, thanks for the info.
I dropped all the tables from the sql database and it reconstructed
itself nicely. It was still in the early stages so it wasn't a big
deal but I'll definitely use this trick in the future.

Cameron.
Reply all
Reply to author
Forward
0 new messages