﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Crosslight - Crosslight SQLite PrimaryKey AutoIncrement</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-SQLite-PrimaryKey-AutoIncrement/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Crosslight SQLite PrimaryKey AutoIncrement</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-SQLite-PrimaryKey-AutoIncrement/</link><pubDate>Tue, 03 May 2016 04:35:35 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;... why do I have to set it to -100 (as in the data sqlite sample) in order to work properly? Is this by design or any other reason?&lt;/p&gt;&lt;p&gt;Setting it to -1 works as well. ...&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Yes, you are correct. Setting it to -1 will works as well. To work with auto increment primary keys, we can use any negative number (less than 0). It is recommended to use -1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;We'll have the sample updated by applying default ItemId to -1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Thank you very much for the feedback.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crosslight SQLite PrimaryKey AutoIncrement</title><link>http://www.intersoftsolutions.com/Community/Crosslight/Crosslight-SQLite-PrimaryKey-AutoIncrement/</link><pubDate>Fri, 29 Apr 2016 10:31:21 GMT</pubDate><dc:creator>thomas.albert@tea-net.ch</dc:creator><description>&lt;p&gt;Hello Crosslight Support,&lt;/p&gt;&lt;p&gt;I have a question about Crosslihgt SQLite and primary keys with auto increment.&lt;/p&gt;&lt;p&gt;If the primary key as an integer, why do I have to set it to -100 (as in the data sqlite sample) in order to work properly? Is this by design or any other reason?&amp;nbsp;&lt;/p&gt;&lt;p&gt;Setting it to -1 works as well. But leaving it to 0 just saves the first entity and throws an exception when saving the second entity. Other ORMs like Entity Framework handle a 0 value without any problem.&lt;/p&gt;&lt;p&gt;Thanks for clarifying.&lt;/p&gt;&lt;p&gt;Thomas&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>