I have this piece of code,where i am trying to insert a record(which throws me duplicate issue).But i am trying to insert it using database.insert
EntitySubscription e = [select id from EntitySubscription where ParentId = 'a0CM0000005hyYAMAY' and SubscriberId= '005M0000005BqhVIAS'];
//e exists
EntitySubscription a = new EntitySubscription(ParentId = 'a0CM0000005hyYAMAY',SubscriberId= '005M0000005BqhVIAS');
List<EntitySubscription> collaborationBetMembers = new List<EntitySubscription>();
collaborationBetMembers.add(a);
Database.Saveresult[] saveResult;
saveResult = Database.insert(collaborationBetMembers);
system.debug(saveresult);
Now my issue is above code throws an exception but when i specify false parameter explicityly in
saveResult = Database.insert(collaborationBetMembers,false);
It doesnt throw exception. which is confusing because this documentation shows,its false my default..so my assumption is you dont need to write it explicitly.any idea why http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_methods_system_database_saveresult.htm|StartTopic=Content%2Fapex_methods_system_database_saveresult.htm|SkinName=webhelp
Exception i get is below
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: duplicates value on record with id: : []: