Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Missing records even though inserts appear to occur


When you say  "make sure you have logging on", is this a configuration option in EclipseLink? If so, what is the default behavior?

Chris Mathrusse
christopher.mathrusse@xxxxxxxxxx



Re: [eclipselink-users] Missing records even though inserts appear        to        occur

James Sutherland to: eclipselink-users
10/01/2009 08:15 AM

Sent by: <eclipselink-users-bounces@xxxxxxxxxxx>

Please respond to EclipseLink User Discussions








EclipseLink will always log database errors, as long as logging is not turned
off, make sure you have logging on.  Also the error will be thrown, so make
sure your application is not handling, or ignoring the error.

You can set the column size or definition using the @Column annotation in
JPA.


cmathrusse wrote:
>
> I think I found the issue. The LineItem table was defined as follows:
>
> CREATE TABLE LINE_ITEM (LINE_NO INTEGER NOT NULL, PART_NO VARCHAR(25) NULL
> , ORDER_CODE VARCHAR(1) NOT NULL, ITEM_TYPE VARCHAR(2) NOT NULL,
> UNIT_PRICE NUMERIC(38) NOT NULL, NORMALIZED_PRODUCT_NAME VARCHAR(50) NULL,
> VERSION INTEGER NOT NULL, ORDER_NO VARCHAR(12) NOT NULL, MOD_DATE DATETIME
> NOT NULL, LIST_PRICE NUMERIC(38) NOT NULL, BUY_QTY_DUE FLOAT(32) NOT NULL,
> DISCOUNT_PERCENT FLOAT(32) NOT NULL, CREATE_DATE DATETIME NOT NULL,
> CATALOG_NO VARCHAR(30) NULL, PRIMARY KEY (LINE_NO, ORDER_CODE, ORDER_NO))
> GO
>
> This was the DDL generated by EclipseLink. The problem is with the
> UNIT_PRICE column. It is defined s UNIT_PRICE NUMERIC(38) NOT NULL. The
> LineItem that was missing had a unit price of 6642.5000, which ASE
> complained about when I attempted an insert from DBVisualizer with the
> following message:
>
> Scale error during implicit conversion of NUMERIC value '6642.5000' to a
> NUMERIC field.
>
> If I alter the COLUMN to be NUMERIC(38,2) then the insert succeeds. I'm a
> bit surprised by the fact that no exceptions were thrown during the insert
> of this line item. Absolutely nothing showed in my log file.
>
>
>


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Missing-records-even-though-inserts-appear-to-occur-tp25689440p25696927.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top