by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    avifatal
    @avifatal
    I want to avoid select and if not exists update. thats heavy. how bulkinsert / unaafeupdate solves that?
    Olmo del Corral
    @olmobrutall
    For one case?
    Or for many ?
    avifatal
    @avifatal
    when i import positions, I want to create the customer if not exists
    i have 1000 positions, i want t be efficient.
    every few minutes
    Olmo del Corral
    @olmobrutall
    Then do an bulkinsert of customers
    Mailing 1000 or 2000 queries is not going to make a huge difference
    Making 1 is much better
    avifatal
    @avifatal
    blob
    Hi,
    Have any idea why this may happend?
    this is the stack:
       at Signum.Engine.SqlConnector.ExecuteNonQuery(SqlPreCommandSimple preCommand, CommandType commandType) in C:\projects\Framework\Signum.Engine\Connection\SqlConnector.cs:line 161
       at Signum.Engine.Executor.ExecuteNonQuery(SqlPreCommandSimple preCommand, CommandType commandType) in C:\projects\Framework\Signum.Engine\Connection\Executor.cs:line 36
       at Signum.Engine.Maps.Table.InsertCacheDisableIdentity.<>c__DisplayClass5_0.<GetInsertDisableIdentity>b__0(List`1 list, DirectedGraph`1 graph) in C:\projects\Framework\Signum.Engine\Schema\Schema.Save.cs:line 131
       at Signum.Engine.Maps.Table.<>c__DisplayClass68_2.<InsertMany>b__2(List`1 ls) in C:\projects\Framework\Signum.Engine\Schema\Schema.Save.cs:line 83
       at Signum.Engine.Maps.SaveUtils.SplitStatements[T](IList`1 original, Action`1 action) in C:\projects\Framework\Signum.Engine\Schema\Schema.Save.cs:line 1154
       at Signum.Engine.Maps.Table.InsertMany(List`1 list, DirectedGraph`1 backEdges) in C:\projects\Framework\Signum.Engine\Schema\Schema.Save.cs:line 83
       at Signum.Engine.Saver.SaveGroup(Schema schema, IGrouping`2 group, DirectedGraph`1 backEdges) in C:\projects\Framework\Signum.Engine\Engine\Saver.cs:line 133
       at Signum.Engine.Saver.SaveGraph(Schema schema, DirectedGraph`1 identifiables) in C:\projects\Framework\Signum.Engine\Engine\Saver.cs:line 118
       at Signum.Engine.Saver.Save(Entity[] entities) in C:\projects\Framework\Signum.Engine\Engine\Saver.cs:line 75
       at Signum.Engine.Saver.Save(Entity entity) in C:\projects\Framework\Signum.Engine\Engine\Saver.cs:line 20
       at Signum.Engine.Database.Save[T](T entity) in C:\projects\Framework\Signum.Engine\Database.cs:line 69
       at Signum.Engine.Operations.Graph`1.Execute.<>c__DisplayClass38_1.<Signum.Engine.Operations.Internal.IExecuteOperation.Execute>b__1(IDisposable _) in C:\projects\Framework\Signum.Engine\Operations\Graph.cs:line 539
       at Signum.Utilities.StreamExtensions.EndUsing[T](T disposable, Action`1 action) in C:\projects\Framework\Signum.Utilities\Extensions\StreamExtensions.cs:line 115
       at Signum.Engine.Operations.Graph`1.Execute.Signum.Engine.Operations.Internal.IExecuteOperation.Execute(IEntity entity, Object[] args) in C:\projects\Framework\Signum.Engine\Operations\Graph.cs:line 577
       at Signum.Engine.Operations.OperationLogic.Execute[T](T entity, ExecuteSymbol`1 symbol, Object[] args) in C:\projects\Framework\Signum.Engine\Operations\OperationLogic.cs:line 330
       at AffiliatePortal.Logic.TradeDataSyncer.InnerSync() in C:\projects\AffiliatePortal.Logic\TradeDataSyncer.cs:line 93
       at AffiliatePortal.Logic.Utils.BaseDataSyncer.Sync() in C:\projects\AffiliatePortal.Logic\Utils\BaseDataSyncer.cs:line 14
       at AffiliatePortal.Logic.TradeLogic.<>c.<Start>b__0_0() in C:\projects\AffiliatePortal.Logic\TradeLogic.cs:line 36
       at Signum.Engine.Scheduler.SimpleTaskLogic.<>c.<Start>b__1_1(SimpleTaskSymbol st) in C:\projects\Extensions\Signum.Engine.Extensions\Scheduler\SimpleTaskLogic.cs:line 33
       at Signum.Utilities.PolymorphicExtensions.<>c__DisplayClass6_0`3.<Register>b__0(T t) in C:\projects\Framework\Signum.Utilities\Polymorphic.cs:line 256
       at Signum.Utilities.PolymorphicExtensions.Invoke[T,R](Polymorphic`1 polymorphic, T instance) in C:\projects\Framework\Signum.Utilities\Polymorphic.cs:line 315
       at Signum.Engine.Scheduler.SchedulerLogic.ExecuteSync(ITaskEntity task, ScheduledTaskEntity scheduledTask, IUserEntity user) in C:\projects\Extensions\Signum.Engine.Extensions\Scheduler\SchedulerLogic.cs:line 421
       at Signum.Engine.Scheduler.SchedulerLogic.<>c.<Start>b__11_8(ITaskEntity task, Object[] _) in C:\projects\Extensions\Signum.Engine.Extensions\Scheduler\SchedulerLogic.cs:line 163
       at Signum.Engine.Operations.Graph`1.ConstructFrom`1.<>c__DisplayClass49_0.<Signum.Engine.Operations.Internal.IConstructorFromOperation.Construct>b__1(IDisposable _) in C:\projects\Framework\Signum.Engine\Operations\Graph.cs:line 246
       at Signum.Utilities.StreamExtensions.EndUsing[T](T disposable, Action`1 action) in C:\projects\Framework\Signum.Utilit
    The system works very fast
    it seems like even when the exception is thrown, it happened fast
    the sql server is local
    avifatal
    @avifatal
    Any idea...?
    Olmo del Corral
    @olmobrutall
    Either the SQL is slow of you have a deadlock due to transactions
    avifatal
    @avifatal
    Hi,
    I am trying to work with this WYSIWYG editor: https://github.com/jpuri/react-draft-wysiwyg
    Added to package.json: "react-draft-wysiwyg" : "^1.9.9"
    importing import { Editor } from '../../../node_modules/react-draft-wysiwyg';
    The compiler ask me to allowJs so i added it so compiler options, after I built the project I got 300 js errors.
    It is not possible to add native js react based components?
    Thanks
    Olmo del Corral
    @olmobrutall
    Your need to declare them because we use typescript strict, but you can declare q module as any with a few lines of code
    Or get the typing it it exist
    avifatal
    @avifatal
    Can you give a link to some reference about that
    avifatal
    @avifatal
    Hi
    public Lite<CommissionTierEntity> CommissionTier { get; set; }
    CommissionTierEntity is Embedded entity but yet I need a reference / foreign key to it.
    Olmo del Corral
    @olmobrutall
    You can not, make it normal entity then
    avifatal
    @avifatal
    Normal entity meand eagre loading, right?
    Olmo del Corral
    @olmobrutall
    If not lite, yes
    The problem is that then you need to garbage collect them
    When removed from an Mlist
    avifatal
    @avifatal
    hmmm, problem, its a bug table
    Olmo del Corral
    @olmobrutall
    But you were linking anyway
    avifatal
    @avifatal
    big
    what do you mean?
    Olmo del Corral
    @olmobrutall
    *Cloning them
    avifatal
    @avifatal
    Commition table will have around 1,000,000 rows in a month
    I want to display the tier in it
    Olmo del Corral
    @olmobrutall
    In s SearchControl is possible
    avifatal
    @avifatal
    I can just save the Id, and in the form display a link to the relevant entity via TS
    Olmo del Corral
    @olmobrutall
    My approach was recalculating it in the query
    it is possible to save the id but not to make a FK
    avifatal
    @avifatal
    I can't calculate the ID at run time, think its a high price to pay
    avifatal
    @avifatal

    Question about transactions and scoping.
    In a s SimpleTask, in a small scope I go

    using (var tr = Transaction.ForceNew(System.Data.IsolationLevel.ReadCommitted)){
     bla bla
    }

    but, when I look at Graph source code I see that it is wrapping each save in a transaction.
    How is Transaction.ForceNew before entity.Exexute suppose to work ?

    Thanks

    avifatal
    @avifatal
    Olmo
    Any chance to get an answer here?
    Tx
    Olmo del Corral
    @olmobrutall
    Hi avi
    tell me if you still have problems
    avifatal
    @avifatal
    Hi,
    I have CustomerAdjustmentRequestEntity that has public MList<CustomerEntity> Customers { get; set; }.
    When CustomerAdjustmentRequestOperation.Save is executing I get an error about: Saving 'CustomerEntity' is controlled by the operations which is true, but Im not saving new customers, just connecting existing ones.
    blob
    Thanks