There are lots of factors that deal with your battery, its not an easy swap with whats on the shelf kind of thing like with a Honda Civic. Some of the 07-08 are still running lead core batteries, some are running gel filled glass mat batteries and your car needs to know which you put in and if it matches what was already there. We have seen several cars through our service shop that replaced their batteries at home without reprogramming or installed the wrong kind of battery.
If you are getting zero power, no door locks, no lights anywhere, absolutely nothing then it sounds like you have a connection issue, or an open circuit. There hasn't been a recall issued (yet) but there is a known issue with the connection on the back of the fuse box, its a big spade connector like on a speaker that can sometimes come loose or disconnect. We have seen those issues on some e90s as well, including my own.
As far as there being a problem with having the battery disconnected for too long, I don't have any experience with there being an issue with that. Like I said earlier my car would go days without any power because that spade connector got loose, arc'd and fused itself to the side of my fusebox, but we installed a new fusebox, machined a better connector in house, and the car recorded the power loss, and duration, but had no issues once it was all reconnected. Of course during this service which took a few hours, the battery was not connected.