2011-03-07 33 views
3

我有一個真正簡單的數據庫與8個表:亞音速 - 活動記錄不搶我的所有表

  • 活動
  • 公司
  • 計算機
  • 客戶
  • 服務
  • 用戶
  • 供應商

但是,只要我包含Subsonic的TT文件,它似乎只爲我的兩個表,類和客戶創建類。

,這是什麼原因,我怎麼能解決這個問題?

配置亞音速:

const string Namespace = "SimpleTimerDatabase.Data"; 
const string ConnectionStringName = "SimpleTimerDatabase.Properties.Settings.QTimerConnectionString"; 

//This is the name of your database and is used in naming 
//the repository. By default we set it to the connection string name 
const string DatabaseName = "QTimer"; 

我的連接字符串:

<connectionStrings> 
    <add name="SimpleTimerDatabase.Properties.Settings.QTimerConnectionString" 
     connectionString="Data Source=THESTUDIO\SQLEXPRESS;Initial Catalog=QTimer;Integrated Security=True" 
     providerName="System.Data.SqlClient" /> 
</connectionStrings> 

回答

0

亞音速不做列名的任何檢查,所以當我有一列名爲「類」和另一個名爲「1099」,自動生成的代碼無法編譯,因爲這些都是無效的標識符。

+0

SubSonic 2.2確實做了這個檢查,但對於3.x,你需要使用不同的TT模板來處理這個問題。 – 2011-03-17 19:36:39

0

是否有表中的差異? 「類」和「客戶」表中的主鍵是否配置了其他角色不具備的主鍵?

+0

類沒有PK,客戶做。 – Malfist 2011-03-07 15:52:27

+0

身份專欄如何? – 2011-03-07 15:53:12

+0

這兩個表都有一個標識列,但其他表也是如此。 – Malfist 2011-03-07 15:56:24