Beginner |
 |
Joined: Thu Oct 23, 2003 1:43 pm Posts: 23
|
Hi,
Is there anyway I can pass NULL to Database using primitive types. I have to use objects to pass NULL to nullable columns. I just want to know is there a way to pass NULL using primitive types.
This is what I have:
public class A{
Long _id;
Float _variable // Nullable object.
}
But I want to use like this:
public class A{
Long _id;
float _variable // Nullable primitive
}
The reason is my object takes up lot of memory for each object inside it. I would rather want to use primitives and can still pass NULL somehow to DB if it has a zero or negative values. Please help.
[b]NOTE: The above code is just a sample. Curently each of our object occupies close to 300 bytes. There is a significant change in the size if I replace Nullable objects with primitive types which in this case occupies just 98 bytes.[/b]
Regards,
Raghu
|
|