Changing table schema

Posts   
 
    
luciusism
User
Posts: 119
Joined: 02-Jun-2007
# Posted on: 19-Mar-2008 06:32:23   

llblgen 2.5 Feb 4th 2008 c# .net 2.0

Steps to reproduce: 1.) Open designer, open projects. In project is loaded entity: dbo.customer 2.) Open SQL, execute sql to alter schema to x.customer 3.) In designer, refresh catalog (using shortcut, if that makes a difference) 4.) Error generated in designer.

Solution: Close designer first, alter schema, then open designer and refresh.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 19-Mar-2008 10:26:28   

Which database is this?

What happens when you do the following steps? Steps to reproduce: 1.) Open designer, open projects. In project is loaded entity: dbo.customer 2.) Open SQL, execute sql to alter schema to x.customer 3.) In designer, delete the entity mapping. 4.) In designer, refresh catalog (using shortcut, if that makes a difference) 5.) Error generated in designer.

Would you please paste the error text and stack trace?

luciusism
User
Posts: 119
Joined: 02-Jun-2007
# Posted on: 21-Mar-2008 18:13:03   

The database is SQL 2005

It seems that the error is concerning subTypes. If I make a change to the database while designer is open (i.e., delete a table that is a subType) and then unattended refresh the catalog, the subType does not delete from designer. When I attempt to manually delete the subType, I get the object reference error. A sample of the error is below:


Object reference not set to an instance of an object.

-----[Core exception]--------------------
   at SD.LLBLGen.Pro.Gui.UserControls.InheritanceHierarchyViewer.RemoveShape(EntityShape shape)
   at SD.LLBLGen.Pro.Gui.UserControls.InheritanceHierarchyViewer.Entity_EntityMarkedForDeletion(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityDefinition.MarkEntityDefinitionAsDeleted()
   at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityContainer.Remove(EntityDefinition definitionToRemove)
   at SD.LLBLGen.Pro.Gui.Forms.ProjectExplorer._menuItemEntityDelete_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

I have confirmed that this happens regardless of schema change. Thank you,

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 22-Mar-2008 06:31:06   

Hi luciusism,

I can't reproduce your issue. I followed these steps (using LLBLGenPro Feb 4th 2008 ) :

  1. Open a project (has some subEntities).
  2. Delete the table mapping the subType.
  3. Refresh (I tried normal, with shortcut and unattended).
  4. I receive a message from the refresh routine:_Entity removed because its target table 'dbo.OrderAuditInfo' was not found in the catalog._

Could you attach a tiny repro project + DDL script ?

David Elizondo | LLBLGen Support Team
luciusism
User
Posts: 119
Joined: 02-Jun-2007
# Posted on: 28-Mar-2008 00:36:01   

Hi daelmo, thanks for the reply. I've been having this and similar designer errors (for example, relationships not appearing after refresh unless I delete and recreate tables)

At this time, I'm going to look at the db for errors. Thanks!