Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 100b2db

Browse files
committed
Added some defensive checks incase schema metadata failed to be returns from db, attribute will be omitted
1 parent d468678 commit 100b2db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/T4/OrmLite.Poco.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ manager.StartNewFile(tbl.Name + ".cs");
6060
<# if (MakeSingular) {#>
6161
[Alias("<#=tbl.Name#>")]
6262
<#}#>
63-
<# if (UseSchemaAttribute) {#>
63+
<# if (UseSchemaAttribute && tbl.Schema != null && tbl.Schema.Length > 0) {#>
6464
[Schema("<#=tbl.Schema#>")]
6565
<#}#>
6666
public partial class <#=tbl.ClassName#><#if (tbl.HasPK() && UseIdAsPK) { #> : IHasId<<#=tbl.PK.PropertyType#>><#}#>

0 commit comments

Comments
 (0)