cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <>
Subject Adding Property
Date Mon, 30 Oct 2006 19:59:19 GMT
Hallo Cayenne Users!

The generic-exmaple (see
was useful for me.
There you add columns via:

DbEntity messageTable = orMapping.getDbEntity("message");
DbAttribute topicColumn = new DbAttribute("topic", Types.VARCHAR,
ObjEntity messageEntity = orMapping.getObjEntity("Message");
ObjAttribute topicProperty = new ObjAttribute("topic",
String.class.getName(), messageEntity);

For what is method messageTable.dbAttributeAdded(AttributeEvent)? Who 
receives what?
How can I add columns at runtime, after I created the default db schema,
so that the existing columns will not be removed? Should I subclass
DbGenerator? Or is this only possible with raw sql statements?

And how to read ALL properties from database, not only the mapped one.
Because if I add a column externally, it won't appear in cayenne
attribute list: getDbEntity(name).getGeneratedAttributes will fail.
Should I use: Remote Object Persistence?

Thank you, Peter.

Telefonate ohne weitere Kosten vom PC zum PC:

View raw message