
<rss version="2.0">
<channel>
    <title>LLBLGen.com Forums General feed</title>
    <link>http://llblgen.com/TinyForum/Threads.aspx?ForumID=7</link>
    <description>This is the RSS feed for the forum General on the LLBLGen.com Forums forum system.</description>
    <ttl>30</ttl>
    <language>en-us</language>

	
		<item>
			<title>typed IPredicate by zivtir</title>
			<description>&lt;span&gt;Hi&lt;br&gt;i m using this code:&lt;br&gt;&lt;br&gt;internal void RunUpdatePredicateExpression(EntityBase2 entityToUpdate, IPredicate[] predicates)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IRelationPredicateBucket filter = new RelationPredicateBucket();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (var item in predicates)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;filter.PredicateExpression.AddWithAnd(item);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;using (IDataAccessAdapter adapter = this.DataAccessAdapterProvider.GetAdapter())&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;adapter.UpdateEntitiesDirectly(entityToUpdate, filter);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;now i want that the IPredicate be for specific entity on the declaration of the function.&lt;br&gt;it prevent runtime error when i try to add Predicates which are not match the entityToUpdate.&lt;br&gt;how can i manage it?&lt;br&gt;thanks &lt;/span&gt;</description>
			<author>zivtir</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18631&amp;StartAtMessage=0#104455</link>
			<pubDate>Tue, 07 Sep 2010 10:53:12 GMT</pubDate>
			<category>typed IPredicate</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18631&amp;StartAtMessage=0#104455</guid>
		</item>
	
		<item>
			<title>Getting Graph by Walaa</title>
			<description>&lt;span&gt;You should avoid loading the full graph as much as possible.&lt;br&gt;This can lead to loading the entire database into memory.&lt;/span&gt;</description>
			<author>Walaa</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18628&amp;StartAtMessage=0#104409</link>
			<pubDate>Mon, 06 Sep 2010 13:26:49 GMT</pubDate>
			<category>Getting Graph</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18628&amp;StartAtMessage=0#104409</guid>
		</item>
	
		<item>
			<title>Getting Graph by alexvdb25</title>
			<description>&lt;span&gt;Hi,&lt;br&gt;&lt;br&gt;Is there a way to automatically load the full graph for a particular entity by code?&lt;br&gt;&lt;br&gt;I want to write a generic function which determines at run-time which related entities should be loaded....  &lt;br&gt;&lt;br&gt;Is this possible?&lt;br&gt;&lt;br&gt;Thanks and best regards,&lt;br&gt;Alex &lt;img src=&quot;pics/smileycool.gif&quot; border=&quot;0&quot; alt=&quot;Cool&quot;&gt;&lt;/span&gt;</description>
			<author>alexvdb25</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18628&amp;StartAtMessage=0#104403</link>
			<pubDate>Mon, 06 Sep 2010 11:04:24 GMT</pubDate>
			<category>Getting Graph</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18628&amp;StartAtMessage=0#104403</guid>
		</item>
	
		<item>
			<title>Foreign key must be defined in database for v3.0? by Otis</title>
			<description>&lt;span&gt;We are aware of this situation, and we will address this in 3.1. The main problem is that the relationship in the model always has to have an equivalent FK in the relational model, or if you set a setting it simply won't need that, but that's a black/white switch, there's a grey area where you for SOME relationships you want this behavior and for some others you don't. &lt;br&gt;&lt;br&gt;In general people won't run into this that often, but edge cases can happen which might force you to jump though hoops. My question to you is: if you can't add the FK to the DB, due to bad data, don't you think it will bug you at runtime when you fetch that data and it will turn out that the data is inconsistent and thus for example Fk field values don't match any PK value?&lt;/span&gt;</description>
			<author>Otis</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18501&amp;StartAtMessage=0#104371</link>
			<pubDate>Sat, 04 Sep 2010 09:42:13 GMT</pubDate>
			<category>Foreign key must be defined in database for v3.0?</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18501&amp;StartAtMessage=0#104371</guid>
		</item>
	
		<item>
			<title>Identity columns SQL Server and updating Entities by Otis</title>
			<description>&lt;span&gt;&lt;table width=&quot;95%&quot; align=&quot;center&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot;&gt;
    &lt;tr&gt;
      &lt;td align=&quot;left&quot;&gt;&lt;b&gt;PaulWilson wrote:&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class=&quot;QuoteText&quot;&gt;Thanks - have found it.  Few questions:&lt;br&gt;&lt;br&gt;a) It is possible to set a default to @@IDENTITY&lt;br&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;&lt;br&gt;No. @@IDENTITY is in general discouraged. It is only necessary when triggers are used which affect the scope's identity value. &lt;br&gt;&lt;br&gt;&lt;table width=&quot;95%&quot; align=&quot;center&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot;&gt;
    &lt;tr&gt;
      &lt;td align=&quot;left&quot;&gt;&lt;b&gt;Quote:&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class=&quot;QuoteText&quot;&gt;&lt;br&gt;b) Is it possible to bulk update all entities to use @@IDENTITY&lt;br&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;&lt;br&gt;Yes, two ways:&lt;br&gt;1) open the llblgenproj file in notepad, then global replace &lt;br&gt;SequenceToUse=&quot;SCOPE_IDENTITY()&quot; &lt;br&gt;with&lt;br&gt;SequenceToUse=&quot;@@IDENTITY&quot; &lt;br&gt;&lt;br&gt;or &lt;br&gt;2) with Element search, using a query over the mappings, then update the field mappings with a different DBSequence object, however it's a tad complex to do this (but doable). So it's easier to use option 1).&lt;br&gt;&lt;br&gt;If you want option 2) (e.g. you want only a subset of the number of entities being updated to @@IDENTITY, let us know so we can formulate the piece of code for you to run in element search.&lt;/span&gt;</description>
			<author>Otis</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104352</link>
			<pubDate>Fri, 03 Sep 2010 15:55:31 GMT</pubDate>
			<category>Identity columns SQL Server and updating Entities</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104352</guid>
		</item>
	
		<item>
			<title>Foreign key must be defined in database for v3.0? by carni4</title>
			<description>&lt;span&gt;Is there by chance a way to turn off the requirement that relationships defined in the designer be set to foreign keys in the database, without turning off the creation of new relationships based on discovered foreign key constraints?&lt;br&gt;&lt;br&gt;Basically what I have is some bad/old data that prevents the creation of a few foreign key constraints (and I don't have time to investigate the possibility of nulling that bad data out at the moment), but I need the LLBLGen relationships to be there. The RelationshipsFollowDBForeignKeyConstraints setting mentioned in this thread helps me with that situation obviously, but won't it prevent database refreshes from recognizing new relationships that exist in the database but not in LLBLGen? What happens if I create a series of new tables and refresh the database? Will the relationships based on FKs in the new tables not be created in LLBLGen? I am pained when I think of having to remember to manually create the relationships every time.&lt;br&gt;&lt;br&gt;Thank you in advance for your attention.&lt;/span&gt;</description>
			<author>carni4</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18501&amp;StartAtMessage=0#104347</link>
			<pubDate>Fri, 03 Sep 2010 15:44:19 GMT</pubDate>
			<category>Foreign key must be defined in database for v3.0?</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18501&amp;StartAtMessage=0#104347</guid>
		</item>
	
		<item>
			<title>Identity columns SQL Server and updating Entities by PaulWilson</title>
			<description>&lt;span&gt;Thanks - have found it.  Few questions:&lt;br&gt;&lt;br&gt;a) It is possible to set a default to @@IDENTITY&lt;br&gt;b) Is it possible to bulk update all entities to use @@IDENTITY&lt;br&gt;&lt;br&gt;&lt;/span&gt;</description>
			<author>PaulWilson</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104338</link>
			<pubDate>Fri, 03 Sep 2010 11:40:27 GMT</pubDate>
			<category>Identity columns SQL Server and updating Entities</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104338</guid>
		</item>
	
		<item>
			<title>ORMValueTypeMismatchException was unhandled by user code by PaulWilson</title>
			<description>&lt;span&gt;This is related to using triggers with SCOPE_IDENTITY and is solved by updating the Field Mapping of the Entity and altering 'sequence' to @@IDENTITY (assuming that the trigger doesn't change this value).&lt;br&gt;&lt;br&gt;Please see &lt;a href=&quot;http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=18605&quot; target=&quot;_blank&quot;&gt;http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=18605&lt;/a&gt;&lt;/span&gt;</description>
			<author>PaulWilson</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18531&amp;StartAtMessage=0#104337</link>
			<pubDate>Fri, 03 Sep 2010 11:37:10 GMT</pubDate>
			<category>ORMValueTypeMismatchException was unhandled by user code</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18531&amp;StartAtMessage=0#104337</guid>
		</item>
	
		<item>
			<title>Identity columns SQL Server and updating Entities by Otis</title>
			<description>&lt;span&gt;&lt;table width=&quot;95%&quot; align=&quot;center&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot;&gt;
    &lt;tr&gt;
      &lt;td align=&quot;left&quot;&gt;&lt;b&gt;PaulWilson wrote:&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td class=&quot;QuoteText&quot;&gt;I started replying about 2 hours ago, then got called into meetings so I didn't see your reply Otis. I can't find where I'd switch sequence mapping. There is a sequence in the preferences SEQ_{$EntityName} butI can't find it anywhere else. Where should I be looking.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;&lt;br&gt;Open the entity in the entity editor, go to 'field mappings' tab, you'll see the SCOPE_IDENTITY() sequence right next to the field which is the PK. Change it to @@IDENTITY. &lt;br&gt;&lt;br&gt;SCOPE_IDENTITY doesn't work with triggers AND identity inserts, because the scope of the trigger is different. &lt;/span&gt;</description>
			<author>Otis</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104335</link>
			<pubDate>Fri, 03 Sep 2010 11:25:01 GMT</pubDate>
			<category>Identity columns SQL Server and updating Entities</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104335</guid>
		</item>
	
		<item>
			<title>Identity columns SQL Server and updating Entities by PaulWilson</title>
			<description>&lt;span&gt;I started replying about 2 hours ago, then got called into meetings so I didn't see your reply Otis. I can't find where I'd switch sequence mapping. There is a sequence in the preferences SEQ_{$EntityName} butI can't find it anywhere else. Where should I be looking.&lt;/span&gt;</description>
			<author>PaulWilson</author>
			<link>http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104332</link>
			<pubDate>Fri, 03 Sep 2010 10:29:50 GMT</pubDate>
			<category>Identity columns SQL Server and updating Entities</category>
			<guid isPermaLink="true">http://llblgen.com/TinyForum/Messages.aspx?ThreadID=18605&amp;StartAtMessage=0#104332</guid>
		</item>
	
</channel>
</rss>  
