I'm going to answer all these posts with one entry to save time:
jd001982:
Quote:
How was it done before? I'm sure the app didn't just stuff an entire array into a single column, because that isn't even 1NF, so each array element must be somehow stored individually. If that's true, then mapping each element is just a straight application of Hibernate basic value type mapping.
*** Yes, it is "stuffed" into a single column as an array declared float8[] and char(256)[]
hhuber:Quote:
Otherwise, you'll probably have to resort to DTO (data transport objects) in which you load your data from the db using lists and then copy the data to your real objects.
*** I believe this is the solution we are going to use, we will have to convince the team that it is the way to go and then create the methods to do the copying. I think it will be a lot better than creating a bunch of tables to hold the arrays and then mapping them back to the parent table ***
Jaimie:Quote:
The main question to ask is
"How is the data currently stored in the databse, how is it currently accessed etc." .
*** It is stored as float8[] and char(256)[] -- one dimensional arrays in a column of the database ***
Quote:
Also, are you working for a sonar firm that sells it's products through an agent called tritech? Just some of the code you've posted seems familiar
*** No, I don't work this firm :-) ***