Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

java - How to map a Map of Sets in JPA -


is there way in jpa map attribute type map<string, set<address>>

given following classes:

class company {   int id;   map<string, set<address>> addresses; // key country of address }  class address {   int id;   string country; } 

there 3 tables:

tbl_company   id int  tbl_address   id int   country varchar(40)  tbl_company_address   company_id int   address_id int 

how can map scenario jpa

one of possible solutions having address-wrapping class, , insert set class. in case able use map (using @onetomany, @mapkey annotations). e.g.

@onetomany(mappedby = ...) @mapkey(name = "countrykey") private map<string, addresswrapper> addresswrappers; 

.. , addresswrapper contain @onetomany set<address> addresses;, along string countrykey.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -