I need a little advice.
We've got a Spring managed, hibernate-backed domain/model object that looks like this:
- String firstname
- String lastname
- String street1
- State state
- Country country
Both State and Country are objects that, via hibernate, are many-to-one relationships to records in the state and countries table.
My question is this:
Can I use this object without using hibernate? In other words, the object is everything I want it to be with regard to fields, getters, setters, etc.
But I want to create this object, store data in it, and later throw it away without it ever getting persisted to the database. Any danger there? Will anything complain?
How do I handle the State and Country objects? When I create the object I need to set State and Country based on the StateID and CountryID which I have. But without hibernate in the picture the system won't know how to create a State object or a Country object, right?
Any guidance is most appreciated.