Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedDifference Between / Purpose of ModuleID vs. DesktopModuleID?Difference Between / Purpose of ModuleID vs. DesktopModuleID?
Previous
 
Next
New Post
4/13/2011 9:46 AM
 
I have written the following query for purposes of finding the instances of my module within the system:

    USE [DotNetNuke_FogBugz_Module_Dev];

    SELECT m.ModuleID, [md].[ModuleDefID], [dm].[DesktopModuleID], dm.FriendlyName FROM
                              ([DesktopModules] dm INNER JOIN [ModuleDefinitions] md ON (dm.DesktopModuleID = md.DesktopModuleID) 
                                INNER JOIN Modules m ON (m.ModuleDefID = md.ModuleDefID))
                          WHERE dm.FriendlyName = 'My Module Name';




It returns (as expected) the two module instances that I presently have installed in my DNN portal, the first with a ModuleID of 375, and the second with a ModuleID of 377. 

Both records returned from the query have the same ModuleDefID (109) and DesktopModuleID (67). 

In terms of uniquely identifying only module instances that are in my portal, and are of the type of the module I am developing, do I have all of the unique keys required to create a related weak entity? (see diagram below)
 

Thank you,
    Andrew J. Leer
 
New Post
4/13/2011 1:11 PM
 
Andrew, while DesktopModuleID is required for the module to be properly registerd in DotNetNuke, you should not create a key against it. By creating a foreign key against the Modules table (the one you should use), it will handle cascading deletes when a module is deleted (from a page and recycle bin, or uninstalled). Basically, the DesktopModules table is part of the module's definition and registration in DotNetNuke (ie. 1 DesktopModule record can have multiple ModuleDefinitions records), while the Modules table really represents placement of a ModuleDefinition (this is also joined on TabModules for complete 'placement' details). 

Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
4/13/2011 1:40 PM
 
Should I just be using the Personalization Settings instead of adding a foreign key to the table?

What I'm working on is just an administration interface for a module, so I doubt it would matter performance wise.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedDifference Between / Purpose of ModuleID vs. DesktopModuleID?Difference Between / Purpose of ModuleID vs. DesktopModuleID?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out