-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from sandogeek/main
ref[orm]: Optimize naming and logic
- Loading branch information
Showing
4 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.zfoo.orm.entity; | ||
|
||
import com.zfoo.orm.anno.EntityCache; | ||
import com.zfoo.orm.anno.Id; | ||
import com.zfoo.orm.anno.Index; | ||
import com.zfoo.orm.model.IEntity; | ||
import org.bson.codecs.pojo.annotations.BsonId; | ||
|
||
/** | ||
* 用法有问题的entity | ||
* | ||
* @author Sando | ||
* @version 1.0 | ||
* @since 2024/7/30 | ||
*/ | ||
@EntityCache | ||
public class WrongEntity implements IEntity<String> { | ||
@BsonId | ||
private String userName; | ||
@Id | ||
private String mailId; | ||
|
||
@Override | ||
public String id() { | ||
return mailId; | ||
} | ||
|
||
public String getMailId() { | ||
return mailId; | ||
} | ||
|
||
public void setMailId(String mailId) { | ||
this.mailId = mailId; | ||
} | ||
|
||
public String getUserName() { | ||
return userName; | ||
} | ||
|
||
public void setUserName(String userName) { | ||
this.userName = userName; | ||
} | ||
} |