Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Custom objects into Database.

Hi all,

 

I need to add a custom object into the database.

I tried serializing my object, to no avail.

 

this is what i followed for the same:

http://pervezonblog.blogspot.in/2013/08/how-to-serialize-any-user-defined.html

 

Any pointers?

Thanks.

Please use plain text.
Developer
simon_hain
Posts: 16,093
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Custom objects into Database.

I usually map my classes to the database without writing a generic serializer, maybe that would be easier for you as well?

(create a column for each attribute etc)

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Re: Custom objects into Database.

[ Edited ]

my class has numerous attributes and they keep changing according to client requirement all the time.

so I do not prefer that way. 

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Custom objects into Database.

serializing into a blob object does seem to be the way to go then, why didn't it work the first time?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Charuta_Rajopadhye
Posts: 92
Registered: ‎08-01-2013
My Device: Z10, Q5, Q10
My Carrier: Vodaphone

Re: Custom objects into Database.

[ Edited ]

I m unable to pinpoint the issue in the code, will you please be able to share or point me to some code snippet for the same?

These are the URLs i referred to earlier:

 

http://pervezonblog.blogspot.in/2013/08/how-to-serialize-any-user-defined.html

http://stackoverflow.com/questions/18194582/how-to-store-a-qrect-in-sqlite

Please use plain text.