Originally posted by Gregg Bolinger:
Anyway, for some reason, when the values are pulled it is pulling the hardware_id for both id and hardware in my pojo.
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Originally posted by Craig Walls:
I'm unclear what you mean by this. Could you expand on this statement?
Originally posted by Gregg Bolinger:
I get 2 for both the Id and hardware (which is just hardware name).
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Originally posted by Craig Walls:
Okay, I understand your problem now. Not sure I know what's causing it, but I do understand it.
First, are you sure you get 2 both when you call getId() and getHardware()? Have you put in a debug to print/log the results for each?
Second, I see that you're using Hibernate. What's the Hibernate mapping file look like for those two properties?
Finally, it looks like you're using JSF for the presentation...what does the JSP look like that displays that select box?
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Originally posted by Craig Walls:
I'm stumped...but let me have you try a few things just to see what happens.
First, when you lookup a specific Hardware instance (using the other methods in your DAO class) do you have the same problem?
Second, try changing your getHardwareList() method to look like this:
This should be functionally equivalent...Does the same thing happen?
Originally posted by Gregg Bolinger:
I should mention also that I am using Hibernate3 and I downloaded the latest CVS of Springs H3 support classes. All my imports are importing the correct springframework.orm.hibernate3 classes.
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Originally posted by Gregg Bolinger:
Solved you say? But how? I dropped Hibernate. I am using iBatis now instead.
Originally posted by Gregg Bolinger:
The cool thing?? Not including the iBatis config files, I had to create 1 extra class. My iBatis implementation of my HardwareDAO class. Then I just wired up the beans in applicationConfig. I didn't have to touch a single class that uses the service. Now that rocks!
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |