New Posts New Posts RSS Feed: How do I add a new entity to Cabana?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How do I add a new entity to Cabana?

 Post Reply Post Reply
Author
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Topic: How do I add a new entity to Cabana?
    Posted: 02-Aug-2007 at 1:15pm
I am building a new module.  It is a module that will handle the Persons table in the IdeaBlade Tutorial database.  If I add the Persons table through the ORM, the Person class is generated just fine.  I build the Cabana.Model project, then try to configure databindings on a controlbindingmanager on a view in my new module.  I select Cabana.Model from the list and all of the types show up...except Person.  Is there something else that I need to do in Cabana in order for the new entity type to show up?
 
Bill
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 02-Aug-2007 at 2:03pm
Criminey!!  One step forward...two steps backward!!  DebuggerDisplays, Deletion Guards, BindingBrowsable, Verification, Validation, Audits, Security Checks . . . none of this is even hinted at in any documentation for Cabana.  Is it assumed that I should know this?  If so, how?  Where can I find documentation of this stuff?  Obviously, I am missing one of these things (or all!) which will allow me to add a simple controlbindingmanager to a view.
 
Deep cleansing breath.  In . . . out . . . slowly.
 
I'm going home.
Bill
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 6:42am
If I add a new entity it gets created with this declaration:
 
public sealed partial class Person : PersonDataRow
 
The examples from the existing entities look like this:
 
public sealed class Employee : EmployeeDataRow
 
Why is the Employee class not marked as partial?  Or, why is the Person class marked as partial?
 
This has nothing to do with the entity being seen in the configure databindings window.  It still doesn't show up.  I am just curious.
 
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 9:40am

The problem with new entities not showing up in a binding manager is a well known issue with DevForce (actually a Visual Studio issue).  The solution is to close and re-open the designer window.  If that doesn't work, close and re-open the solution in Visual Studio.

The current version of the DevForce object mapper generates entity classes with the partial keyword.  This is correct behavior.  Perhaps the entities without the partial keyword were generated with an earlier version of DevForce.

 
Bill
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Aug-2007 at 10:11am
Thanks, Bill.  The entities are showing up.  I appreciate you clearing up the "partial" thing, too.  Makes sense.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down