Why so many bugs (dotConnect for Oracle)?

Why so many bugs (dotConnect for Oracle)?

Postby dqminh » Fri 30 Jan 2009 13:05

Hi,

dotConnect for Oracle version 5.0.20

The relation ship between to tables cannot be processed. I have two tables, which have parent-child relation ship. After generate code using Entity Developer, running website, the Object reference not set to an instance of an object exception throw.

Code to create database:

Code: Select all
DROP SEQUENCE v2_seq_File;
DROP SEQUENCE v2_seq_Message;
CREATE TABLE v2_data_File(
    File_Id       NUMBER(10, 0)     NOT NULL,
    Message_Id    NUMBER(38, 0)     NOT NULL,
    File_Name     NVARCHAR2(128)    NOT NULL,
    Body          LONG RAW          NOT NULL,
    CONSTRAINT PK113 PRIMARY KEY (File_Id)
)
;
CREATE TABLE v2_data_Message(
    Message_Id      NUMBER(10, 0)     NOT NULL,
    Parent_Id       NUMBER(10, 0),
    From_Dealer     VARCHAR2(30),
    To_Dealer       VARCHAR2(30),
    Body            NVARCHAR2(512)    NOT NULL,
    Created_Date    TIMESTAMP(6)      NOT NULL,
    Created_By      NVARCHAR2(256)    NOT NULL,
    Flag            CHAR(1)           NOT NULL,
    CONSTRAINT v2_PK01 PRIMARY KEY (Message_Id)
)
;
ALTER TABLE v2_data_File ADD CONSTRAINT Refv2_data_Message189
    FOREIGN KEY (Message_Id)
    REFERENCES v2_data_Message(Message_Id)
;
ALTER TABLE v2_data_Message ADD CONSTRAINT Refv2_data_Message180
    FOREIGN KEY (Parent_Id)
    REFERENCES v2_data_Message(Message_Id)
;
CREATE SEQUENCE v2_seq_File MINVALUE 1 MAXVALUE
999999999999999999999999999 START WITH 1 INCREMENT BY 1 CACHE 20;

CREATE OR REPLACE TRIGGER v2_data_File_U_PK BEFORE INSERT ON v2_data_File
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT v2_seq_File.NEXTVAL INTO :NEW.File_Id FROM DUAL;
END;
/
CREATE SEQUENCE v2_seq_Message MINVALUE 1 MAXVALUE
999999999999999999999999999 START WITH 1 INCREMENT BY 1 CACHE 20;

CREATE OR REPLACE TRIGGER v2_data_Message_U_PK BEFORE INSERT ON v2_data_Message
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT v2_seq_Message.NEXTVAL INTO :NEW.Message_Id FROM DUAL;
END;
/



When generated database, if NOT choose Auto Generated Value (A.G.V) for each primary key (Auto-Sync on Insert), it run ok. But if choose A.G.V, the exception throw. Trace:

Code: Select all
[NullReferenceException: Object reference not set to an instance of an object.]
   Devart.Data.Linq.r.a(Object& A_0, Object A_1, MetaDataMember A_2) +484
   Devart.Data.Linq.r.a(MetaType A_0, n A_1, ModifiedMemberInfo[] A_2) +2291
   Devart.Data.Linq.t.a(h A_0, Object A_1, ModifiedMemberInfo[] A_2) +465
   Devart.Data.Linq.i.a(e A_0) +342
   Devart.Data.Linq.i.d() +44
   Devart.Data.Linq.DataContext.SubmitChanges() +73
   _Default.Button1_Click(Object sender, EventArgs e) in d:\Working\Temp\TestDevart\Default.aspx.cs:23
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Note that, if not has parent-child relation ship, the A.G.V run ok.

PLEASE check and fix soon.
dqminh
 
Posts: 28
Joined: Wed 12 Nov 2008 01:31

Postby dqminh » Fri 30 Jan 2009 13:22

Another bug: InsertAllOnSubmit does not work:

Code: Select all
Message msg1 = new Message() { Body = DateTime.Now.ToLongDateString(), CreatedBy = "admin1", CreatedDate = DateTime.Now, Flag = "S", ToDealer = "NKP001A" };
Message msg2 = new Message() { Body = DateTime.Now.ToLongDateString(), CreatedBy = "admin2", CreatedDate = DateTime.Now, Flag = "S", ToDealer = "NKP001A" };
db.Messages.InsertAllOnSubmit(new Message[] { msg1, msg2 });
db.SubmitChanges();
dqminh
 
Posts: 28
Joined: Wed 12 Nov 2008 01:31

Postby AndreyR » Fri 30 Jan 2009 15:02

Thank you for the report, we have reproduced the problem.
I will let you know as soon as any results are available.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Mon 02 Feb 2009 11:08

Both problems are fixed. Look forward to the next build.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby dqminh » Mon 02 Feb 2009 12:54

Good news.

Don't forget fix the bug DESC sort.
dqminh
 
Posts: 28
Joined: Wed 12 Nov 2008 01:31


Return to LinqConnect (LINQ to SQL support)